Paulo Ferreira

MrPLC Member
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Paulo Ferreira

  • Rank
    Sparky

Profile Information

  • Location Portugal
  • Country Portugal
  1. CJ2M and GSM?

    Has anyone connected Cx-Programmer to a CJ2M via a GSM modem? With CJ1M there is a "Modem" tab inside the "Toolbus" network protocol, but CJ2M doesn't have the "Toolbus" option, only USB and ethernet. I tried searching the forums but searching for "gsm" returns 0 results, don't know why. EDIT: I guess this should be in the Cx-Programmer subforum.
  2. CJ2M Slow USB?

    Transferring a small CSV file from a memory card that is inserted in a CJ2M to a folder in the PC via USB takes a long time (400kb in more or less 1.5 min). Obviously it doesn't take that long when copying the file from a normal memory card reader. Is it normal to be this slow? Is USB slower than it should be, the compact flash is of bad quality or is it just a setting I need to change like configuring the baud rate in a RS232? Thanks.
  3. Send Floats (REAL) to Excel

    How do you guys send a REAL value (2 WORDS) to Excel? Is there a simple way? Or do I need to send the 2 words separately and then convert them to IEEE754 or something?
  4. Is it possible to get some feedback or ACK of the data that is sent from Excel to the PLC. I have a lot of data I'm sending to the PLC and I'm using something like Sheet1.Comms1.D(10000) = Sheet1.Cells(1,1). However this doesn't tell me if the data was delivered correctly. Do you know of some way to get a confirmation that the data was all delivered?
  5. Calculating number of days between two dates

    The logic seems correct and simple. I believe it would work just fine... well, unless you disconnect the machine and connect it after a couple of billion years which seems unlikely :) I'll probably give that algorithm a go, no complex real number divisions. Thanks Michael.
  6. Calculating number of days between two dates

    Excellent timing, just finished doing exactly that :)
  7. Calculating number of days between two dates

    That seems really simple and effective if the power is always on, or at least powered every day. However the machine can be powered off for several days, and when turned on I need to know how many days have passed since the last recorded date. I've just finished my solution, implemented the julian date algorithm, it's somewhat more complex. Created a ST Function Block that calculates the Julian Number of each gregorian date, and then subtracts the second Julian day from the first and the result is the number of days. Check it out in the attachment if you want. I have just a small problem, the conversion functions REAL_TO_UINT or REAL_TO_DINT round the number to the nearest integer but I needed them to be truncated. Can't seem to find a standard ST function to do that. Bytes, if you figure out a easier way to do this, please advise me ;) EDIT: Well... went with the classic subtract 0.5 and let it round to the nearest integer and it works great, takes into account leap years and everything. Updated the attachment if you guys want to see it and comment on how ugly it is. :)
  8. Calculating number of days between two dates

    Not really following you Jay. CADD and CSUB add or subtract hours, minutes and seconds to a date, I don't see how I can use it when I have 2 dates (year, month, day). Can you give me a hint on what you were thinking, some pseudo-algorithm so I can elaborate on that. Thanks.
  9. Hello there. Basically the title says it all. I'm using a CJ2M-CPU11. I have 2 different dates that I got through A352 and A353 (day, month and year) and I need to find the number of days between the 2 dates, do you know of any simple way to get it? Is there an instruction to convert the date or to get the date from the system in seconds with reference to some epoch? Didn't find what I needed in the manual and now I'm venturing with algorithms for calculating julian days.
  10. Bulk adding Actions to SFC program

    I'm new to PLC programming when compared with most of the people here on the forum, so my brain is already formatted with the IEC 1131 and 1499... it's somewhat hard to learn "oldschool" techniques when the new ones are so rooted. In a "8GB pocket mp3 player" age, shouldn't industrial controller memory not be a problem at all? Is it just an economic interest to limit the evolution of PLC memory so that companies can charge a lot more for a little more memory? Well, thanks for all the help
  11. Bulk adding Actions to SFC program

    Ok. Simple and feasible. Off course I'll need to add some stuff, but it's a real solid base to start from. I'll use your advice to use another IR for the times, since they need to be customizable too. Thanks for the help.
  12. Bulk adding Actions to SFC program

    That seems about right. Every main process is activated with different conditions (flags, timers, dates, buttons pressed, etc). Every subprocess activation is controlled only with timers (after X time the next step is activated). That's why I used SFC, states and subcharts are easy to create and control of their time is incredibly simple. The H memory is (like you said) pre-configured for each subprocess. So each subprocess just needs to activate/deactivate the 16 digital outputs acording to the table stored in H memory. Example: Process_1.Subprocess_1 ::: H30.00 -> Q1.00; H30.01 -> Q1.01; ...; H30.15 -> Q1.15 Process_1.Subprocess_2 ::: H31.00 -> Q1.00; H31.01 -> Q1.01; ...; H31.15 -> Q1.15 ... Process_2.Subprocess_1 ::: H42.00 -> Q1.00; H42.01 -> Q1.01; ...; H42.15 -> Q1.15 ... I'm currently programming this with 16 IR,DR, one for each output... and whenever the subprocess changes I just add a constant to the offset. I'll be waiting for your opinion. Thanks for the help.
  13. Bulk adding Actions to SFC program

    96 different instances in the same ladder program/action? And all sfc states use the same action? Is that what you're saying? I also read the indirect address tutorial and it seems obvious that it's the way to go. Should I use 16IR's for the HR memory and connect them to I1.00 to I1.15, or should I use 2 IR's, one to go through the HR memory and another for the CIO? What do you think?
  14. CX-Server Lite Excel 2007

    Thanks, the developer tab showed up. The omron custom toolbar didn't however, not even in the add-ins tab. But it is installed because the controls showup in a list when I press "Insert" -> "More controls" -> OMRON CX something. Weird. Had some problems during installation with cx-server runtime, don't know if it has anything to do with this.
  15. Bulk adding Actions to SFC program

    Hi lostcontrol. Here's a printscreen. I believe you can see everything you need. - The Main control SFC - The subcharts - Subchart1 open with its Steps - The Actions it lets me add (1, 21 and 22 that were added manually), despite the symbol list having a lot more actions that were added with the CXR file - The list of Digital Outputs for each step on the right stored in H memory. - The ladder program which outputs the STEPx_DOxx that are stored on H memory. I would prefer using SFC, but it really is memory intensive. Can you give an example on how it would be made with indirect addressing? Thanks.