Ekke

MrPLC Member
  • Content count

    29
  • Joined

  • Last visited

Posts posted by Ekke


  1. 7 minutes ago, Inntele said:

    The key problem is in this. At present you are processing only very short messages. When the length of messages will increase, the scan time will stretch, that may affect (will effect) to control processes. Despite on it's just a one of sources of input data for control process...

    I understand that it's slower than your method, but don't have the knowledge to get it to work with xmodem. I tried, but gave up since there was a simpler option. :)

    It seemed that I kinda got hang of it how it works on CRC16-modbus, how that "1001" bit sequence is "moved" with one position in all those M8-M15 with different hex-values (240-9000 and 2001)...  


  2. 2 minutes ago, Inntele said:

    @Ekke

    I'd like:
    1. That you are thinking about the task with your brain, not mine.
    2. In order for you to understand thoroughly, using the example, given to you, exactly how it works.
    3. To spend time studying the principles of calculating the checksum, and not to search for ready-made solutions in Internet !

    I managed to understand the principle of calculating the CRC16-XMODEM and realize your task, because:
    1. I've not only optimized the algorithm of CRC calculation for PLC, but, most importantly, I understand how to calculate checksums.
    2. Found on the Internet a description of the shift algorithm for calculating the required checksum.
    3. I achieved the result, that is desired for you, by method of probes and mistakes.

    And:
    1. With my help you could got the same result for the same time, if spent you time for learning the issue.
    2  I dare to remind you:

     

     

    Ok. thanks for the help! I will figure it out someday. :)

    CRC isn't that much in my interest, just have to calculate it since these RFIDs uses it. I think I could live without it in this project, but there isn't any way to turn it off..


  3. Well, found a demo and transfered your project to GX Works 3. Now if I input D1 = H0012 and D0 = 1, I get K4M0 = H4D3F running in FX5.

    And https://crccalc.com/ gives 0x4D3F for CRC-16/MODBUS when input is 12 / Hex.

    But didn't get any right results with anything above 1 for D0. Maybe I will figure it out some day, this was just a quick test. Thanks! :)


  4. On 7/4/2019 at 3:45 AM, Inntele said:

    Below you can find a five minutes code sample of Modbus CRC16 calculation, written in GX Developer and suitable for FX2N and above PLC models (including FX5, if to replace M8000 with SM8000 and CJ P63 to GOEND), that supports SWAP instruction.

    Modbus_CRC16_calculation_sample.zip 

    It seems that I don't have GX Developer nor license to it, could you print that project to pdf or take screenshots from it? :)


  5. On 02/07/2019 at 9:35 AM, Inntele said:

    Well. Then little tips:
    1. XMODEM uses the CCITT method for CRC16 calculation. 
    2. The traditional algorithms of CRC calculation like a bit shifting or a table are not effective for implementation in PLCs and MCUs, because they devours a scan time (shifting) or a memory (table).
    3. The ST language gives a worst result than the LD/FBD, because the first language uses an universal compiler, written by a PC programmer that even did not understand that the computing resourses are important to save.

    When I will have a free time I could help you with effective PLC code...

    Hmm.. I have mainly used FBD but not for this kind of calculations. Not sure how that would be more effective to do without bit shifting since I think all examples I found have been done that way. :)

    I got those RFID readers today and configured them to RS485 bus so I can start testing. Well, not really releated to CRC-calculation but anyway.. :D


  6. Hi,

    I'm trying to use RFID reader connected to FX5 via RS485, but it needs CRC to it's transmission protocol.  I know that GX Works 3 has CRC instruction, but the problem is that it uses CRC-16 and I need CRC-CCITT. Polynomials are CRC-16 "X16 + X15 + X2 + 1" vs "X16 + X12 + X5 + 1" for CRC-CCITT.

    Any idea if there is a easy / efficient way to implement this, or would it be easier to generate a table for CRCs? I think I will have something like 50-100 different messages... Thanks!


  7. 4 hours ago, Ninza T said:

    Hi Levent1970, can you share me where you can download " FB s from Mitsubishi ", i can't find example from mitsubishi.

    They should appear when you add  FX5-40SSC to Module Configuration.. I'm using FB-language and have these in Element Selection -> Module:elements.thumb.jpg.024a8f61cbd138b20a97c


  8. Hi!

    Tried to install GX Works 3 v1.053F, previous version was 1.040S. I got a BSOD when installing it, and now my GXW3 says version is 1.00A.

    Uninstall from Control panel says ”Other language product has already been installed. Please install GX Works3 again after uninstalling the installed product.”  and if I try to intall 1.053, it says the same thing.

    Any ideas what's "the correct way" to remove or repair this?

    Thanks!


  9. 21 hours ago, kaare_t said:

    That is partially correct, and is somehow why I was asking some questions about what you're going to use it for...:

    If you have time for TCP to open, communicate and close before the next new open, communicate, close then it's all OK. If you need to transfer data to several PLC's at the same time for example you can't do it with only one connection since TCP is connection-oriented...

    This is why it's important to start with a spec, more or less... What is the requirement. Since you have time to wait for connection handling between communication then you can create a sequence between two or more PLC's without problems. Great that you got it working! :-)

    Yeah, still don't have a clear picture what are "limitations" with this system, or what kind those are. And don't have "specs to start with" since don't know what would be needed in, let's say, 5 years from now. Just don't want a system, that is too limited in some way and speed isn't top priority in this system. But surely it can't be "too slow", just don't know how slow is ok, and when we will hit that limit if doing this type of TCP-open-communicate-close network... :kewl:


  10. On 1/24/2019 at 7:08 PM, kaare_t said:

    I see, well then you have to make some decisions...

    Good luck with decisions, and let us know if you have questions or concerns and we'll try to give some tips and pointers :-)

    Well, had some time to put effort to this again, and it seems that you can use one connection to access multiple PLCs in TCP/IP... Tried with 3x FX5, one as a master and used only 1 connection in that.. this might be one part of the solution :lookingaround:

     


  11. 22 hours ago, kaare_t said:

    Well, when you say you need that quantity of data to be transferred I'm not sure I would recommend SLMP either... I would say CCLinkIE Field. I know it's more expensive, but a system like you describe is probably worth it, or? I would say that with the fairly complexity of your system it would be worth it to cut down on man-hours since it will be easier to setup and maintain than any alternative. But of course, SLMP gives you a flexibility that CCLinkIE Basic doesn't offer... I must have misunderstood your original post, as you mentioned an alarm-handling system. I thought you were to transfer some alarms from "nodes" to a central unit, but the way you are writing makes me think you might want some more (which is fully understandable), but that changes the game a little.

    In any way, you don't need any special cabling for CCLinkIE Field. It's standard CAT6 cabling for Gigabit Ethernet, and it's both switchable and routeable.

    Thanks for the input again.

    Well, not 100% sure what we "need" but it would be nice to have some "futureproof" so we don't run out of I/O (well, mainly inputs) in the future. 

    Idea was to gather inputs from different places and show alarms/info in the HMI screen(s). Not very critical system, but a way to get info faster and in more usable form to users.

    We have quite good coverage ethernet in the factory, so it would be nice to use it, not to wire a second network "parallel" to it.

    Closest thing I have found is RJ71EN71 and socket communications (TCP/IP or UDP/IP), it allows these:

    P1 connector No. 17-64 connection
    P2 connector No. 1-64 connection 

    That would be plenty, my guess it that we need maybe 20-30 to cover most of planned alarms/info. Just no idea about the speed etc. but I think it won't be a problem since we don't have "that time critical" things happening so few sec delay would be ok.

    I tried Brainboxes ED-008 8xDI/O "remote I/O" option and connected it (Modbus TCP/IP) to FX5, it seems to work ok so it might be one cheap option to add I/O to this system.. (140 eur / 8 inputs is quite cheap but it needs 24V too).

    I still haven't wrapped my head around this, what limitations there are in different systems etc. But I think you are right, CCLinkIE Field might be the best option, but it seems to be a little overkill and costs might be a problem... our business isn't that big and only few workers :)

     


  12. On 11/21/2018 at 8:59 PM, kaare_t said:

    Sorry for the late reply.

    SLMP is great, but also check out CCLinkIE-Simple (or what it's called), I think that's built-in to the FX5... I bet it would simplify the setup, but I'm not sure of the specs for the "Simple" version in regards to dataexchange quantity and so on. But it's worth mentioning and checking out.

    All in all, your topology seems like a good choice I believe. Good luck, and write a post if you have questions.

    Finally did some "research" with this and it seems there are quite big limitations with FX5 and/or IE Field Basic, I think this is what you referred as "Simple".

    If I have understood right, IE Basic can have 4096 remote inputs (RX) and max. 64 stations. But that 64 is 16 stations in 4 groups. iQ-R supports groups, but iQ-F (FX5) doesn't. So it's down to 16 stations. And that 4096 remote inputs is actually 4x1024 so inputs are down to 1024 too. That's not really that much and surely isn't "futureproof". (As a sidenote, with FX5 as a master, there can be only 6 stations and 384 inputs).

    And then there is that IE Field.. that needs own cabling, so it kinda isn't what we were looking for (idea was to use network we already have) and doubles cost of every FX5.

    I'm not sure if we can use some other "communication method" and use those 2x64 connections that iQ-R offers, I think that would be enough for a future too.


  13. 1 hour ago, SolidRio said:

    Hello everyone. 

     I found a cheap encoder S48-8-1000ZT (1000 pulses) and connect him to FX5U's X0 and X1 (2 phase - 1 edge mode, if i can trust manual - it allows me detect all pulses below 200 kHZ frequency). Changed input response time to 10micro-s. I created a program that simply look at this counting and make some math. If i am rotating encoder with fingers slowly - all works great (my mark matches at encoder and 1000 pulses in program), but if i turn it by 1 sharp fast move and then again and again - marks move by half turn at for example at 10000 pulses. 

    So i need your experience. Whats going wrong? Is plc dont have enough response speed? Or something wrong with encoder? Or with my configuration?

    I need to use FX5U and encoder at 1500 r/min motor (with another encoder), so i need to test it before going on object.

    Post your code? Are you using high-speed processing instructions?


  14. On 11/8/2018 at 8:29 PM, kaare_t said:

    Regarding the limitations on the Ethernet module, were you thinking of using it for anything special, or are you considering using Fixed Buffer comms or Predefined Protocol/SLMP between stations and master? I would still recommend CCLinkIE Field module for the FX and a CCLink IE Field module for the R (or use the RxxEN that also supports CCLinkIE Field).

    Thanks for the reply. I think SLMP is ok, but haven't really checked other options... 

    That FX5-CCLIEF about doubles the price of FX5, so would like to use plain PLCs... :)

    Well, maybe we will just start with some FX5s and try to solve problems when they appear.. :P

    For now, it's only planned to have "one-way-connection" so FX5s are just inputs.. and I think this will be just auxilary system to get alarms where they are needed, some buzzer screaming in the factory hall doesn't "always" tell what's the problem and where. So not very critical system, but really helpful if we can get everything to work as expected.

     


  15. Hi!

    We are thinking to build an "alert system" to our factory by using iQ-F FX5 PLCs and HMI screens in locations where needed. All connected via ethernet since we have wiring for that in many places already. Might not be the best option available, but these PLCs are pretty cheap, familiar, scalable (we don't know yet how many I/Os, analog inputs, temperature sensors etc. are needed) and small enough. The plan was to use maybe just 5 PLCs to start with and then add more when needed. I think we need one master PLC to communicate with HMIs to "hold everything together". :)

    But found some "problems":

    There seems to be a limitation on the number of input/output points and it's "up to 384 points" in remote points (according to FX5 Hardware User's Manual). But those "points" are for CC-Link/AnyWireASLINK, so I don't know if that "affects" ethernet systems too? CC-Link IE?

    But there is max. 8 stations/connections limit for one FX5 master...

    Can this (or these) be avoided by using iQ-R PLC as a master PLC? RJ71EN71 ethernet module says "128 connections (connections usable on a program)" (64/ethernet-port). And I didn't find that kind of limitation in input/output points with iQ-R... 

    Is there some other thoughts & limitations we should consider? When we will hit the roof with this kind of system?

    Thanks!