David Larsson

MrPLC Member
  • Content count

    28
  • Joined

  • Last visited

Everything posted by David Larsson

  1. [Utilities] - FINS_UDP.zip

    File Name: FINS_UDP.zip File Submitter: David Larsson File Submitted: 5 Mar 2007 File Category: Utilities This is a little program I made in the process of learning how to connect to a omron PLC using Ethernet and UDP FINS with JAVA. I will put up some samplecode later on to explain how it works in java. As I see it JAVA is an excellent language to use to this and the only problem that I encountered was how to transform all the strings to make them understandable for the PLC that wants hex-code thru a socket that only can send a byte array. The program lets you create a socket connection and then you can send commands to the PLC and get the responce. Click here to download this file
  2. Write program to PLC thru SerialPort using WP

    Hi! I´m having trouble figuring out how the WP command works and how I should use it. The PLC is a CPM1A V1 I have a application that will be used alot of times and always will look the same so I want to be able to send a CD with the installer for our software and then it scans for connected plc´s of the right model. Well I have all that workng and when it finds a plc it adds it to the database and adds an ID to the plc´s memory and starts to read the status of the plc. Its all working as a charm but as it is now a small program is needed in the plc and that means that I need to send all plc´s here, unpack them, program them, pack them again and then send them to the customer. The solution is that if its a new plc which the pc-software knows if it is it could program it and then use it. But I cant get the command to work and I´m not sure if I get the right program out the plc. I use MultiWay to figure out what commands to send in my software but the WP command isnt really explained much. I use the RP command and get alot of data from the plc which seems to be the program. But if I use the download program function in MultiWay I get another Hex-code. And if I try to send it all I get is a message back that basicly says that it didnt work. (Should return 00 if it works but it returns 84) The command I´m trying to send now looks like this: @00WP0080081B9E00010C140C1480091D9E0C1600010C16800A1D9E0C1800010C18800B1D9E0C1A00010C1A800C1D9E0C1C00010C1C800D1D9E0C1E00010C1EA0081D9E0C2800010C28A0091D9E0C2A00010C2AA00A1D9E0C2C00010C2CA00B1D9E0C2E00010C2EA00C1D9E0C3000010C30A00D1D9E0C3200010C321814DEADDEAD18011801 + checkSum+*+\r Its the command first @00WP00 (Should the last two 00 be there?) then its the program that was in the textfile downloaded from the plc and then the same ending I use for all other commands that works. Could really need some help figuring out how to send this cause it would save me alot of work later on. /David
  3. Write program to PLC thru SerialPort using WP

    Hi! Thanx for your help! I will look into it under the day and hopefully it will work... Omron should really write some more about this command in their manual. /David
  4. Setting induvidial bits in IR with hostlink on CPM2C

    Thanx for your reply! That might just work actually. If I force it and then just after cancel the force. I´ll try it
  5. Hi! I´m trying to set individual bits thru a com-port in the IR area but all I can find is a command to set the entire word. If I do that without knowing the present value of the other bits in the word I will overwrite those. So is there a method to write one bit in an area without altering the other bits except for reading the word first and then write it?
  6. PC and PLC connection - tech question

    Yes this will help him if it wasnt done before. When I first started to work with FINS udp I didnt set up the routing table (didnt think I had to when I was accessing the plc from local network). If this isnt set and everything else is right it should reply some jibberish if you at all get any contact with it. I´m not sure if the software you are using mean jibberish with the "!! (0)" but for your sake I hope so cause then its the routingtable who is causing you trouble. I should have thought about this before when I replied cause I had some major problems with this myself... /David
  7. PC and PLC connection - tech question

    You should get an answer if the ip, node, and network adress is correct and thats even if u send a faulty command. U should also set the unitnumber to 00 to send the messages to the plc´s CPU. /David
  8. Suitable PLC for in car mounting?

    Ah thanks! I didnt think about their powersupplies actually. I´ll look into it. /David
  9. Suitable PLC for in car mounting?

    Hi everyone! I have a project for my company that I´m doing most for my own interest and it includes my car. My idea is to switch the 80´s looking middlepanel with a panel-pc and with that also remove everything from that panel. To get room with the pc I need to remove the climate-controlsystem. Instead I want to control that system with a plc connected to the pc. What plc should I use that can communicate with the pc and control ordinary valves + would be fun with some analog inputs and stuff so that I can collect more info about whats happening with the car. The panel-pc will work as a GPS,Stereo,climate-control and whatever else I can come up with. The PLC needs to be small and I need it to somehow run on 12V. So what do u guys think? /David
  10. Festo FPC 103 plc

    Same old Festo. ´They didnt really thought on that people actually was going to use their stuff so its useability has much to ask. Personally I got rid of all festo-stuff when I came to the company I work in now (A total of 6plc´s have been replaced) not because they where old but just because that they just dont keep up with the competition today. Feels like they are about 10 years behind in some matters... Sorry about the "attack" against festo in this post but in my experience with their plc-products and their plc-support I could just recommend everyone to not use their products. Their programming-software FST doesnt work properly and hangs up frecuently and their plc´s act "strange" and actually doesnt follow the ladder-program as it should. After discussing with support that couldnt understand what was wrong they tried to fix the problem and they failed on it. This was ridiciolus because what that brand new PLC was supposed to do was to drive one servounit betwen 2 positions and one servounit a relative position ahead. And to do this it had simple I/O´s to drive the units with (enabled bit, drive bit, positions bit and positionreached input) It failed on doing this in a simple step-program. After the support was talking about strange programming and other stuff I took my old omron C20H (early 90´s) and did the exact same ladder-program and put it in the same place as the FESTO CPX where before. It worked perfectly at once. When the festo had the same program it sometimes didnt move the servo-unit and sometimes did in some sort of strange random pattern and whatever criteas I tried to add to make it not to it sure kept on in the same way. I think that its a securitydanger to have a plc that can ignore instructions and just go on and I did double and triple-check that it was the right program in the plc. What if it skipped security breaches and such?? I have never worked with a PLC-system with such a low quality and lack insecurity before and its strange that they in the competition today at all can sell products. When we finally had decided to replace all our Festo products and send back the new one the support actually confessed that they have a problem with their software and that its another company that does it for them. To have that kind of problem with a software at version 4 they really should take their products back and refund which they by the way didnt do 100% to us...
  11. Suitable PLC for in car mounting?

    Thanx for the reply. Then this actually should work :) I think that the ideal for this application should be a CJ1M-CPU11-ETN. But even for its small size it gets kind of large for being in a car but I think I need that ethernet card. The idea is to get a small network in the car with the computer and plc and possibly a portabel-computer for a trip or something. And today here in sweden its getting really cheap to have portabel-broadband so I´ll put that in as well :D With that and a gps it should be easy to track the car if something happends and I could really do some fun webapplications to for it. The idea is to make it a project to show some of what I can do in my company (and more cause its fun´:) ) and maybe if it gets costefficient I know of some owners of the same car I have (porsche 928 s4) that are interested in this kind of system. I also just realized that why not use webcams as parkingaid :) The car has a so long hood that its impossible to se where it is so I really need it or I´ll bump into something (again) And with that PLC i get the option for temperature and analog inputs etc so that I can collect informaition about the car. This could really be a fun project :)
  12. Suitable PLC for in car mounting?

    Ah nice with so many replies :) Yes I´m aware of the problem with the electrical system... but I think a converter as someone suggested would work. The ideal would be a circuit that could convert a 12-14V to stabil 24V. I have already found a ready built panelcomputer with 12.1" tochscreen that runs on 12V :) I thought that omron should have atleast one plc that runs on 12V or something but like some people say here I might have to look at other brands. I will work for trying to use omron thou cause I have constructed a FINS communication class for java to another project that I really want to use for this (to save some programming hours). So has anyone used a omron plc with converter 12->24V succesfully? And how much current does CJ1 series and such really use when just switched on and not used? (no outputs enabled)
  13. Sample VB6 Code

    Hi! As I can see it the header and the command seems to be right. I think the problem in your program is the conversion to hex. Have you tried any other command and are you sure of the pc-ip? When I developed a class-library for java I first had the same problem like you getting the same response all the time. In my case it was the conversion of decimal -> hex -> byte[] that was the problem and the information didnt get completely right. Could you post the code that does the conversion?
  14. OMRON LADDER LOGIC? dublicated output warning

    Ah thats a really good idea! I´ll use that in my next project :)
  15. OMRON LADDER LOGIC? dublicated output warning

    When I program I always set all outputs last in the program and all "help"-bits I use in the program is wired directly to the output with only emergency-stop and such things in betwen. It makes up big "or"-circuits but that makes the output easy to overlook,change and handle and there is never any need for any duplicated output cause if one bit is on the output is enabled. If a bit should cancel an output its just coupled as an "and-not"-circuit. This is my way of doing it and I usualy do it in a separet section last in the program.
  16. OMRON LADDER LOGIC? dublicated output warning

    good old days Actually did that thing on a tiny machine here cause there was to little logic for a plc. 4 relays and the machine worked perfectly. Did the thinking like I was programming a plc with the difference that u can only use a sensor once or you have to ad another relay :) Rally fun to test it thou and as u say we take to much for granted these days...
  17. NT2S - display data problem

    I have a CJ1M coupled to NT3S and there I use direct-adressing to show values from the plc-memory. For this I use the peripheral-port on the cpu set on NT-Link 1:N Havent had any problem at all with it so maybe you could try that. You shouldnt need to copy the value from the plc to the screen just to show it. The screen probably reads the same even if u use the copy-command so it just copies !!!!!! to the memory or that it could be the screens way to tell that the memory is unreachable. But try with other settings at first. /David
  18. NT2S - display data problem

    Looks like it should work but whats the reason for copying it to the screens memory? Wouldnt it be easier to do a direct view of the plc´s memory?
  19. UM Memory full?

    Hi! Recently while I was programming a CJ1M-cpu11 I got this error message while I was uploading my program that said that the UM-memory was exceded. What memory is this? Is that the programmemory? Well it sure is a big program with alot of datamovement and stuff but could I really exced the limitations for this cpu? Well i did then slim the application a little but I knew that I was a long way from finishing it but I slimmed it some got it to work again and continued to work with the program now a little more "slim"-programming. And now I´m done and I havent got any more error-messages but I´m sure that the program now is alot bigger than it was at the time of the UM-memory errormessage. Is there some instructions that take up more space than others? I have used alot functionblocks to try to slim it but the main program is still very large and it probably will be extended soon with some callup and sms-functions. I could use more functionblocks but does that help? Anyone here that have a clue to how to avoid the problem (dont want to change cpu)
  20. UM Memory full?

    Yes I used the autoadjustment function before. Hm but I dont alter those memories anywhere in the program and I dont use the date-function anywhere. Strange
  21. UM Memory full?

    This program has alot of code that comes again with different memories and switches so yes I could do a functionblock and use it on more than one place. 2 of the functionblocks I use now has 20instances in the program. But yes a bigger cpu seems to be needed :( By the way I also have a strange problem with this cpu. I use it to display info on a big text sign and among other things I have a clock on it. But every morning now I find the cpu-clock being 2hours behind. I dont use sntp for it but still it seems to change the time. I did use sntp before and thought that it was the problem but it still does the change everyday. I use alot of the DM memory area and maybe I´m using the wrong areas and altering something used by the clock.?? Any ideas?
  22. UM Memory full?

    Hm used UM: 6051steps free UM: 93 Steps :( Used FB: 3329b Free FB: 258303b I think I´ll try to use more functionblocks and also telling my boss that we need a bigger cpu if we want to make the sysem bigger. We had this cpu just laying around so they cant blame me for ordering the wrong plc anyway :) hehe
  23. CJM-plc and siemens mc35i gsm

    Used sleepys program with the exact same equipment you have and it worked great :) Thanx sleepy!
  24. NT3S Restarting

    Hi everyone new to this forum but it seems to be great! I have 2 similar machines both with a NT3S-screen. The programming on the screens and on the PLC´s connected to them is also similar (not exact). On one of the machines the screen restarts a number of time. The strange thing is that it is a regular pattern. After the machine has done 40 cycles it starts to restart every 8 cycle when the machine uses its robot and puts down a new chart. After 100cycles it gets reseted when the magasines on the machine is switched. The problem started after I updated the firmware in the screen. I downloaded the new software version on ntxs and then when did a small correction in the program it asked me to download the firmware along with the program cause the screen has an old firmware. After that the problems started. I dont use any programming that automaticly changes anything on the screen. Alla screenchanges are done by clicking and all it does is showing some information by reading some of the PLC´s memorys. I dont have a clue on what it is really but I have tested the following things. Change the screen. Same program same firmware. The screen almost instantly started to restart itself in the same pattern. Change cable to PLC Changed the cable to the PLC: No change. Change powersource The screen now has its own powersource but the problem remains. Well hope that someone can help me with this. And just to know what can make this screen to restart is interesting. /David Larsson
  25. NT3S Restarting

    Thanx for the help it worked! The screen has been on for I think 2weeks now without restarting at all. Thanx for the help!