dweste

MrPLC Member
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dweste

  • Rank
    Sparky

Profile Information

  • Country Netherlands

Recent Profile Visitors

2249 profile views
  1. CX simulator - problem - CXONE 3.0

    Nope. It's not the same problem. In my FOR loop, the CalcMonth is updated every cycle, so that's no problem. The code runs in a PLC, only the simulator errors. This problem is recognized by Omron, and the guys in Japan are going to fix it.
  2. CX simulator - problem - CXONE 3.0

    I didn't exactly get what you meant, but now I do After some fooling around with a problematic FOR loop. This works in a PLC, but not in the simulator: Month := WORD_BCD_TO_UINT(AND(RTClock_YYMM,16#00FF)); FOR CalcMonth :=1 TO (Month - 1) BY 1 DO TotalMonths := TotalMonths + 1; END_FOR; This works in a PLC and sometimes in the simulator: Month := WORD_BCD_TO_UINT(AND(RTClock_YYMM,16#00FF)); MonthMinus1 := Month - 1; FOR CalcMonth :=1 TO MonthMinus1 BY 1 DO TotalMonths := TotalMonths + 1; END_FOR; This works in both the PLC and the simulator: Month := WORD_BCD_TO_UINT(AND(RTClock_YYMM,16#00FF)); FOR CalcMonth :=1 TO 12 BY 1 DO IF CalcMonth >= Month THEN EXIT; END_IF; TotalMonths := TotalMonths + 1; END_FOR; In my humble opinion, it's bad coding by Omron. If you can't calculate variables in a FOR / WHILE statement, the compiler should error it [edit] Updated with third example. [/edit]
  3. Well, I have a few issues: - Font settings not adjustable in alarm screen (default font is way to small) - Alarm text can't be longer than 40 characters More to come ;)
  4. Weird Error when editing ST Online

    I've seen it before. It usually happens when someone else is connected to the PLC, and is busy with an online edit.
  5. Switch Debouncing

    A simple software timer (TIM or TIMX) behind your switch would do the trick.
  6. Real MOV in CJ1

    I suppose you want to go up to +32767, thats the maximum for a 16-bit signed integer? Instead of 'MOVF +32767 x_REAL' you can use 'FLT +32767 x_REAL'. Instead of 'MOVF -32768 x_REAL' you can use 'FLT -32768 x_REAL'.
  7. Communicating with PLC

    For an -out-of-the-box- Omron PLC, you should use Toolbus with the peripheral port cable. You can use SYSMAC WAY too, but thats slower, and it needs CPU dipswitch 4 on. So, don't do that and just use Toolbus :) Controllerlink is a realtime Omron network. When you have a connection to a PLC with Controllerlink you can connect to any PLC on the Controllerlink network.
  8. Communicating with PLC

    Doubleclick on your PLC in the Project Workspace. Choose your Network Type, and click Settings -> Driver. There you should see a Port Name field.
  9. NS Error

    Slow updating could be your ethernet connection. Cable not 100%, or heavy network traffic. Or two identical IPs on the network (do-it-yourself network specialists).
  10. How to connect to the data memory

    Its a long time ago working with NT screens for me. When I recall correctly, you can choose Hexadecimal or Decimal representation in your screen. And you can choose between Binary and BCD in your numeral table. Options options... Drove me crazy that days.
  11. Speed control with encoder feedback

    I never used the rate measurement myself, but it should do the trick. With low pulse frequencies, you could even make your own rate measurement in the PLC, using a normal PLC timer. By then, your CT021 will be obsolete. A normal input card is sufficient when the pulse frequency is very low, AND the PLC cycle time is low. I did it myself one time, but take care! I ended up optimizing the program for cycle time because I missed pulses every now and then. Another option would be the CTL41 counter card, 100kHz instead of 500 kHz (CT021), 4 channels instead of 2 and cheaper.
  12. Speed control with encoder feedback

    The manual for the CT021 is W401-E1-02 (CJ1W-CT021 High-speed Counter Units OPERATION MANUAL). SECTION 3 is about setup, and SECTION 4 about exchanging data with the CPU. Operating a counter in a nutshell: You have to choose a counter type and a counter signal type. This can be done in the IO table, or direct with DM words. See section 3-2 and 3-3. You have to open the counter gate for each counter. See section 4-2-3. (page 102). Current counter value appears in n+22, n+23 for counter 1, and n+27, n+28 for counter 2. (n = CIO2000 + (Nx10), address of the first word of the block of 40 CIO words that are allocated to the Unit) The DA041 requires similar setup and operation, as described in W345-E1-09 (Analog I/O Units OPERATION MANUAL) Hope this helps :)
  13. Function Block reference Acrobat files

    You can even point CX to your own function block folder under 'Tools->Options->General->FB library storage folder', so you can make your own FB library, with PDF documentation
  14. CX-Programmer improvement requests

    RSI saver all the way! We're begging for that function like 2 years or something, but Omron in the Netherlands seems to think it's not that important. It is very important though, especially at those times when you have to update 360 instances manually.
  15. cant transfer program to cj1m cpu12

    Maybe you can format your 4 GB CF card as FAT 2GB. This will not change any hardware, but maybe you can trick the PLC this way. I haven't got a > 2GB card here, so I can't test it. By far the easiest way is buying a <= 2 GB card anyway. Good luck!