Jump to content

LeonMötter

Members
  • Posts

    30
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

LeonMötter's Achievements

Member

Member (2/4)

0

Reputation

  1. Thanks for all the responses. turns out the problem was more hardware related (maybe). i opened the PLC up en took the jumpers for the analog inputs off and back on again. After that the problem was gone. Could it have that one of jumpers had a lose connection and the value i saw in the debugger was jumping between 4-20 mA and either a thermo koppel or PTC input?
  2. So i have a weird problem where i have a source writing to the same MI (MI661 in a V560) that i am using to store the value of a temperature sensor. The problem is that i don't know where it is coming from and the more i started looking the stranger it seems to get. I found the problem when i was looking at data from the temperature sensor a noticed that where a lot of points where the value fell below expected values. (normal is between 3400 and 350 and sometimes is noticed a value somewhere between 248 and 272). To find out in which part of my program i screwed up i disabled the sensor and i used the debugger to stop the PLC program. And then i noticed the first weird thing. Normally when the PLC is in stop mode you can write a Mi to zero and it should stay that way until the program is started again. In this case that doesn't happen. when i write a 0 to the MI it will immediately change back to the strange value it was on before, regardless of the state of the PLC. Because of this, i thought maybe the source is not in the PLC itself but in one of the connected network devices. This PLC is a Modbus slave to 2 masters. The first is another Unitronics PLC (SM35). The second is a SCADA package (ignition). I disconnect them both and still something is writing to this MI. So to summarize i have something writing to a MI even when the PLC is in stop mode and there is no network connection or anything else. Anybody any idea what could be going on here? do i have a ghost in my machine?
  3. So a small update, we got everything we working as we want to (almost). it took a bit of fine tuning to get all the calculations in the right range so that precision isn't hurting us to much. There are still a few things to improve, first cleaning the nets. It is working but it is a bit of mess. We have a lot of this going on. but that should be easy to fix. The number of PLC cycles we have to do to get an accurate model at the moment is (((2 * N) * 50) * 15) where N is the sample size for the model fit. the latest test we used 66 samples. so in this case i took 99000 cycles to finish the calculation. This took about 12,5 minutes. The next goal is getting this down to about 10 min. if we get below 10 minutes we can calculate a model faster then the cycle time of the machine. i also have to say it is kind of satisfying to start the calculation and watch it in the debugger. Just seeing all the numbers fly by and then stopping when a solution is found.
  4. around 13/14 so not too bad. when the calculations are not running it is about 9/10. so there is a significant impact on the cycle time. I also should have specified a little better what i meant with a single cycle. We still do only 1 calculation in each PLC cycle. but in our math program we have to do 2 calculations for each data point (so 51 data points gives 102 calculations). then this cycle repeats until the calculated error is within acceptable range. in the latest test this was around 50 cycles. Not at all, it is almost inevitable that we are going to use it in the end. just to get everything optimized. The biggest reason we didn't started that way is because our test program is written in python. Because of the complexity of the math it is easier to just copy the formula's in to math blocks without converting everything. it also doesn't help that my colleague is a mathematician and not a PLC programmer. so getting him to understand what he can or can't do has been a lot of fun. i hope that in the future that i can post some of program. i have to make sure that there isn't any sensitive information in it before i am allowed to do that. and probably add some more comments to make it somewhat understandable. what i can is that we are using this method: https://en.wikipedia.org/wiki/Newton's_method
  5. I hope i can avoid that, but yes if we can't get it to work with the floats we are going to have to switch. Yes that is what i wanted to know. We thought it was something like this when looking at the values through the online mode, but we where not sure if this was possibly a limit off the online mode itself. No, but that is because all of the result calculations are in floats. Honestly i haven't considered this. i move that to plan C if we get stuck. As a positive note, yesterday we basically got the program working for 1 parameter of the model (we still need 3 more). granted this was with a small data set so this made it a little easier. but still a small victory. And me and my colleague were actually surprised how fast the calculations were done. in this test we did around 102 calculations in a program cycle and in around 50 cycles the calculation was finished. so we still have hope we can pull this off.
  6. In some cases yes, but most no. Most op the inputs to the math are integers. but after that it is a lot easier to stay in floats. The range we use is around 1X10E7 to 1x10E-8. This has to do with the iterative process. we start with very large numbers and the more cycles that have been run the smaller the values get.
  7. oh i am well aware that PLC's in general are not meant to be used in this way. In an earlier discussion in the company we discussed sending the data to a server/computer to do the calculations. That would have made the calculation part a lot simpler. Downside is that the machine is going to be depended of that server and the connection to it. A long time ago we have made the decision to not make any of our production machines depended of external computing. so we opted for the hard path. That being said we already made great progress in programming and can actually achieve a pretty accurate model in a decent amount of time (the latest test we did a few 100 calculations in 20 seconds). The problem is that we don't really understand where the precision is lost. if we know that we can compensate for that.
  8. I have been working on putting some pretty complicated math (at least complicated to me, some people may disagree) in to a PLC (in my case it is a V560). I am running into some problems (i think) with the capacity of MF's. it looks like i am loosing precision (read the number of digits after the point) as the value increases. That is to be expected the only problem is i can not find how this is defined. If i know that i can hopefully adjust the formula's to stay within limits to keep the results as accurately as possible. For some more background information the math we are trying to do is calculating a model of the machine process in realtime, and then use the model to adjust machine. it is al lot of iterative math based on sensor input. we are talking about somewhere between 20 to math blocks that need to do about 500 to 1000 cycles to calculate the model. is is basically calculating a simulation and comparing that to the data. We have done some test with a small part and i am actually pretty surprised by the performance of the PLC. The problem is that somewhere we are losing precision in the calculations as described above and we are not sure where. if we know what te limits are we can (hopefully) adjust the program.
  9. Thanks for the input, @Ausman, the numbers always stay the same, but new ones are constantly added. that is the reason we have a external database (SQL server) that can send recipes to each production machine. There are 11 production machines so keeping some sort of an internal database in each of them is probably not the best idea. Still Thanks for the reply.
  10. So i am currently looking in to the possibility off sending strings (probably between 20 and 32 characters) to a v560 plc over modbus TCP. The purpose of the string is product name/version that is going to be produced on the machine where the v560 is installed. So the operator can easily sees if the right parameters are loaded. currently we do this with a 7 to 10 digit number but a mistake is easily made. How i am thinking of achieving this is by converting the string to ASCII and writing it to 16 integers. Then in theory i could use ASCII string variable to display the name on the HMI. For the moment i dont see any problems with the setup, but before i start writing the program i thought i might be smart to ask around here for other opinions. maybe there is a smarter way to do this?
  11. Unfortunately not. This is one of the reasons that i still prefer using visilogic PLC's. Just to have this option.
  12. Thanks DanT, This morning with a clear i mind i installed the latest version of unilogic to try if that helped and indeed then the usb connection worked. It would have been nice if i just got a error messages with a version mismatch, but that is probably to easy. The reason i am still working on a older version of Unilogic is that upgrading the PLC firmware on the USC models a pain in the ass. Well not so much the updating part but getting the PLC to read the USB stick. A problem i ran in to today again. Eventually i got it to work, but then i was a few hours in. Problems like this really makes me wonder what the problem was with upgrading through a cable. Leon
  13. I have been having a lot of problems trying to communicate with a new out of the box USC-B5-B1. My first attempt at downloading the program was over USB. When i plug in the USB cable the device is recognizable in the download menu, but when i select it and press the download button the download menu disappears and nothing seems to happen. I have tried rebooting the PC and the PLC and unplugging the USB cable en and plugging it back in with no result. My next train of thought was maybe it has something to do with the PC that i am using, so i swapped PC's and did a brand new installation of Unilogic. The result was exactly the same. The PLC is recognized but i cant seem to do anything with it. My last attempt was to use the Ethernet port. So i plugged that in and switched my PC to a static IP of 192.168.1.10 and put in 192.168.1.4 (which should be the default for this unit). Unilogic could not find the PLC, But when i use ping in the windows command line with address 192.168.1.4 i do get a response. So there seems to be a connection. I also tried switching of the firewall in the PC, but that also does not seem to work. At this point i am running out of ideas, hence this post and hoping someone recognizes this problem. To make sure that all the information is here: PLC: USC-B5-B1 with hardware add-ons: UAC-CB-01RS4_0, UID-0016T_1 and UID-1600_2 Unilogic: version 1.26.90
  14. Thanks for info, Now i have some homework to do i think . I have worked with visilogic modbus functions in the past so i have to refresh my memory a bit before i start. But this certainly gives more options. To give a little bit more information about my setup, i have a USC-B5-TR22 which works as an intermediate between PRIVA (building ventilation) and our production machines which are running on a V560 and a SM35. So it allows me to automatically start the ventilation when a machine is started, or working the other way PRIVA can request to turn on exhaust fans on the machine if it gets to hot in The building and there are machines that are not running production. At the moment i have different communication speeds, most are just status checks so i have the cyclicly running on 60 sec, There is one exception and that is a write action that basically has to be as fast a possible, i could change it to something apericodic maybe. I am going to experiment and report back here.
  15. I am working on a project that has a single unistream PLC with 11 Samba PLC as slaves. The slaves are in every way identical except of course for there address and name. I have made the current setup with arrays for the data that i am reading and writing, For example: valve_status[0-10] which contains the status of particular valve from all of the slaves or vent_start[0-10] which i can manually start a fan on all the slaves. Now for my question, i have to expand the current program and i have to exchange more data between the slaves which i can do manually. In this case it is 6 operations to add for each slave so in total 66 operations to add. Not fun but can be done. The other option i see is change 1 slave, delete the rest and then duplicate the first slave and change all the addresses, both the IP and the array numbers. Also not a fun job. Am i missing an option? or is there perhaps a way to make a setup that is easier changed? The thing is that this probably the first of a number of expansions that i have to make so i would rahter spend more time now then repeating the same mistakes.
×
×
  • Create New...