Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by DaveB

  1. Dear colleagues, Regarding this topic, does anybody know how to build the frame or message via TCP to be sent to a 3G or 4G router to send SMS? I understand that this is possible with the "TCP/IP send" function in Visilogic, but if I am not mistaken, the message must contain a specific structure (user, password, destination number, message, etc) which may be different depending on the manufacturer. Having a look at the unitronics router UCR (https://myzone-kza3sadj.netdna-ssl.com/wp-content/uploads//2020/06/UCR_User_Manual.pdf) I can't find this structure for the message. Could you please help me? Thank you and best regards.
  2. Dear colleagues, I'd like to share my first project using Unistream. It consists in a test bench for an important manufacturer of industrial HVAC systems and compressors in a new factory in Spain. When a new compressor is finished in the production line, it has to pass the test bench in order to be suitable for selling. These compressors can reach up to 250 KVA of power in 50 or 60 Hz and there are three independent lines: - The first line is for machines from 200 to 460 volts in 50 and 60 Hz and up to 250 KVA. - The second line is for machines from 12 to 48 volts in 50 and 60 Hz - The third line is for machines from 12 to 48 volts in DC. I used Unistream mainly for three reasons: - I needed to communicate with 5 Modbus RTU slaves (Power meters). Comms are quite easy with Unilogic. - I needed to use function blocks to control the great amount of contactors during the commutations. I can also manage them individually in manual mode with a unique faceplate indexing the data of the instance based on the object pressed in the screen. I wanted to integrate also interlock management and the fail-to-start alarms so the function block was almost mandatory. - I had a big datalogging requirement with the test results with the powers, currents, voltages, power factor from all the power meters to allow the operator to analyze the data from the test. There was requirements for trends and for exporting the data to CSV files. So the control consists in a sequence of steps which also requires intervention of the operator to select the frequency, and voltage. Once this is selected, the PLC will close the contactor with the 50 Hz or will start the speed drive with 60 Hz. It will also close the correspondent output of the transformer with the selected voltage and then it will start the fine tuning by regulating a variac up or down acting as a voltage stabilizer. I tried to do this with a PID but it’s quiet complicate since the variac is not analogic. You have to increase or decrease the voltage on it through two digital outputs (up and down). Trying to tune this PID resulted into impossible or not reaching a minimum error between the setpoint and the output or continuously oscillating. So I created my own PID where I sent a continuous pulse or small pulses depending on the distance between SP and MV. With this and a configurable minimum error I could set the MV with less than 0.5 volt error. The part with the communications was quite tricky as I couldn’t communicate with the 5 Modbus RTU slaves at the speed I needed and I had continuous congestions making the RS485 network to crash. Since the values from the power meters were used as the MV for my PID, I needed more speed so we added the TCP module to three of them. Then I had Modbus TCP and RTU but the change in the network performance was very important. The datalogging part was also challenging, because of the amount of data. I added a “record” mode on each line to start the datalogging, create a new CSV and close it once the test was completed. I’d like to thank to my colleagues in Grupo Galiana (Spain) for developing and building this amazing machine and the Unitronics forum people for the help. It was really challenging but the effort was well worthwhile. Thanks to everyone. Best Regards
  3. Thank you guys. I thought this was slow even for serial comms. It would not be a problem if the read data would be just to display the values in the HMI, but I need them as Process Value for PIDs, so the tunning is becoming very hard. Thank and have a nice day DaveB
  4. Hi Alex, Thanks a lot. It worked!! I've noticed that the performance of the RS485 network is very slow. I takes around 3 seconds to read all the slaves (5 in total) with 5 Aperiodic Indirect Group Trigger functions. I don't have dropped packets but it is slow no matter the speed of the requests (I made a loop from 1 to 5 and i ask each slave in each step of the loop). I tried it also using periodic function but I had lots of problems with dropped packets. The network becomes saturated. Do you have any sugestion? I have to read 10 holding registers from 3 devices and 1 holding register from the other 2. Is there any way, maybe to request multiple holding register when they are consecutives? Maybe that will increase speed. I also configured the network to 115 kbps. Or maybe using other function as Modbus Aperiodic Direct? Thank you for your help and best regards.
  5. Dear colleagues. I hope you are doing fine. I have 5 power meters in a RS485 bus communicating through Modbus RTU with one Unistream which is acting as master. 3 of them are from the same brand and model. They are all ok, connecting and communicating. The registers are 32 bit length (treated as INT32 in the Unilogic). So far everything is good. For the other 2, from different manufacturer, It seems I am receiving the data in a strange way because the data is not coherent. It seems I am receiving the words or bytes inverted. if I use a external Modbus client in my laptot, I can see the value correctly displayed as a FLOAT32 ABCD and it matches with the actual value (12.3, 24.1, 48.3 volts... etc). In contrast, with the PLC I see gigantic values. I tried to use the swap byte funcions but couldn't get it. I don't know whether there is a way to compose a REAL from two INT... Does anybody ever had similar problems/solutions? I am kind of desperate. Thank you and best regards.
  • Create New...