DWIM

MrPLC Member
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DWIM

  • Rank
    Sparky

Profile Information

  • Country United States
  1. Timers do not work in Sturctural Text

    Well, you are right, sort of. In a function a variable dies. Yes.  I just don't see how a timer can/is  garbage collected after a scan. The mechanism is not clear to me in ST. The timer must be re-created. I have to call the whole constructor every time ==> My_Timer(M30,INT_TO_TIME(2000),Hello,ElapsedTime); If it would follow standard behaviour the timer would never fire because it is instanciated every time and start at time zero. It is a local variable, Not?  Even more with global variable timers, which does not work too. It is not enough to use My_Timer.IN and My_Timer.Q inside a scan. This is just quirky.  
  2. FX5U - Problem

    My text from above was just an idea in general regarding PID. To be honest, I never did PID on FX5U. So far I have enough problems with Networking  Never mind PID !!! You poor soul! Does that help  ?
  3. Timers do not work in Sturctural Text

    Hi panic_mode First, I cannot remove the timer. I need one. The sample code is only for testing. I have a a more or less communication code and I do not want to scare everybody with it. I looked into your tips and went ahead and just replaced "Start" input with M20 altogether inside the ST block. Now, M20 is M20 is M20 is M20. Not? At least it lighted up in the code. I then changed the code a bit so i can toggle it during simulation. ==> It had no effect!!! ==> It seems in ST an Timer instances die after the code is finished after a scan.   Then I tried to reference a global timer variable, did not helped. The only thing that worked was more or less to copy the line in the docs : My_Timer(M30,INT_TO_TIME(2000),Hello,ElapsedTime); With  "My_Timer" is local TON or TON_10 variable, "Hello" is a standard output variable, "ElapsedTime" is a local variable inside the ST Functionblock. Well...that was obvious......
  4. Hi, I have a problem because a TON Timer instance in an ST program does not start running. Is this a known limitation on FX5U CPU's or ST Language in General ? On the internet are some discussions, and there is a person which says it works for FX CPU's: https://stackoverflow.com/questions/58463316/delay-timer-in-structured-text?noredirect=1&lq=1 But not for me.... And some discussions here in the forum: http://forums.mrplc.com/index.php?/topic/20864-plc-failing/ http://forums.mrplc.com/index.php?/topic/37923-calling-a-timer-in-st-code/ The last one is interesting, but it did not helped in this simple case.   For clarification, I created a very small program in GX Works3 (v1.057K) The FB instance in Picture 1 works very well if one sets M10 to True. The ST instance in Picture 2 does not start when setting M20 to True. Has anybody a clue? Any help welcome DWIM  
  5. FX5U - Problem

    Hi Kobz Just as input (you may be well aware of) : With PID, if you have a slight difference between target and current value, PID goes to MAX correction by definition. Because it fails to correct the difference and wants to correct that. Maybe this is the nature of the problem. I don't know your setup exactly. Testing PID without real reaction is not practical.
  6. Hey I take my insults against japanese engineers back. I apologise.I There is a link with a bugfix list at: https://www.mitsubishielectric.co.jp/fa/download/software/detailsearch.do?mode=software&kisyu=/plcf&shiryoid=0000000051&lang=1&select=0&softid=1&infostatus=8_1_1&viewradio=1&viewstatus=&viewpos=   List of additional features: ファームウェアバージョン1.201 で追加した新規機能(2019/11) List of bugfixes: ファームウェアバージョン1.200 → 1.201 への改善履歴(2019/11) Since my Japanese is non-existant, I could read it with the help of a friend.
  7. Thanks for your input. Very valuable. About the sensor, it is a level sensor which can handle foam. Not many can do this. This is the main IO-Link unit at the moment. But the goal ist, to have only one input at the PLC and use more IO-LINK Sensors. Szenario Now:  A lot of I/0 Pins for various sensors. Our machine is highly customize able. Means a lot of schema changes because of the many options. So there are a lot of wires to be done. We try to reduce cost by using a small PLC. So the wires are never at the same place. Means a lot erros (every one is too much).  Szenario future: Have a single communication input at the plc and adress as much options via a bus system. IO-Link would match that need. I also thought about MODBUS. But it sounds old say the marketing guys (their age > 60, oh the irony)
  8. I must say, we need IO-Link in 2m distance from the PLC, so CC-Link to Baluff is an expensive solution for 2 meters.
  9. Thank you for sharing your thoughts. I see, I must change the platform as it seems. Nobody here in our area uses Mitsu (hard to find skilled people) and on top of that no connectivity... If we change the product, we can also change the manufacturer.
  10. Hello everybody I would like to have a IO-Link Module on FX3 PLC's . CC-Link is dead here in my area. Every sensor sales man which approaches me yells "IO-LINK" . Please Mitsubishi (If you are listening here) do not play yourself in a corner. We are a small fish (200 PLC's/year). But despite the effort needed to switch to another PLC Manufacturer it seems the only solution for us. Does anybody support my view?    
  11. Hi everybody I had the same error message as initial poster  : The target was a FX3-G. I needed more memory so I modified: Navigation=>Project=>Parameter=>PLC Parameter=>Memory capacity After that I had this error. The solution was to go to Menu=>Tool=>Clear all Parameters. Maybe the settings on your PLC are lost! I didin't tested that.
  12. I have library from Mitsubishi which uses inside "EthernetComm"  Function block and inside this, it uses SP_SOCOPEN  and SP_SOCCLOSE functions Oh, I'll check the states of the SP_SOCxxx functions in their data structure they use...I have now a 12hours workday behind me...my family already called me.  I look into it at best on Sunday. Thanks so far for your help. FX5ModbusTCP_GW3_V100 Version 1.00 - Function block that offers Modbus TCP/IP Client functionality on a FX5-series  PLC system  with a built-in Ethernet port. Created in GX Works3 - 24 May 2016 Function block supports the following CPU-types: FX5-series.    
  13. Constants in array

    No, i think. There is a workaround: Define an array as VAR ==> CONST_LABEL1  (Uppercase indicates in programming a constant) Define each constant as single entity at position 2,3,... in the dialog of your picture ==> CONST_LABEL_1, CONST_LABEL_2 At startup move these constants to the var. Rule: Do never overwrite in your code anything which has all UPPERCASE.   
  14. Thanks for your reply! Yes, there is some information. Mostly about added functions/modules. They have no bugs in the firmware! Clever Japanese engineers....  OK, I would also not publicly admit it ...;-) MODBUS: I tried to connect to MODBUS TCP IO boxes (25 stations). I was astonished to see, that it takes seconds (!) to check/write the IO states of all of them! Welcome in 2020! Yes, seconds I tell you...honestly, not milliseconds! After looking in the mirror I saw the person who bought this technology..... Then I found a reconnect delay in the Mitsubishi library. I could lower it from 800ms (if I recall correctly) to 150ms with a more or less reliable connection. This improved things a little bit. Still very sluggish. Smart me thought: Well, let the PLC use two of its eight ethernet connections simultaneously! So I made: Group1: 12 boxes on ethernet channel 4  Group2: 13 boxes on ethernet channel 5  Now, after all code in place, it connects for a while happily on channel 4 (Group 1) while channel 5 is in "connection opening" state. Then suddenly, an electron moves, and it starts working for a while on channel 2 (Group 2) while connection 4 is waiting in "connection opening" state. I found no pattern, unfortunately. And a lot of hair pulling didn't helped either...... It should be possible to connect on two connections simultaneously, not?  
  15. Hello everybody I have strange effects when connection MODBUS TCP IO-Boxses from my FX5U-80xx. So I thought about looking for network issues fixed in the firmware. So, the website below has firmware 1.201 and I have 1.110 currently. Does anybody know where to look for the revision history of these Firmware fixes? https://www.mitsubishielectric.com/fa/download/software/cnt/plc/index.html#js_swdata_cat_9 The Japanese have some more info here: https://www.mitsubishielectric.co.jp/fa/download/software/detailsearch.do?mode=software&kisyu=/plcf&shiryoid=0000000051&lang=1&select=0&softid=1&infostatus=8_1_1&viewradio=1&viewstatus=&viewpos= Translate:  "New functions added in firmware version 1.201 (2019/11) For details on the additional functions, refer to "Addition and modification of functions" in the related manual "MELSEC iQ-F FX5 User's Manual (Application)". The CPU unit serial number can be used from "17X ****" or later." I was not able to download these manuals (Japanese login screen). So I googled it and found it. But I was not able to find it in this document.  If someone knows more. Would be nice.  Thank you DWIM