Joan M

MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by Joan M


    I don't know if it is the best or not, but whatever soft-plc out there should be OK: CodeSys, TwinCAT...   TwinCAT is free, it installs the runtime in your PC and meanwhile you are using windows and "version 3" or "version 2 with a 32 bits OS" you'll be able to simulate everything, in fact you will have a software based PLC running in your computer.   Notice that except Allen Bradley and Siemens, mostly all the others are using a Codesys flavor.  Anyway if you stay standard then everything should be the same.   Hope this helps.
  2. Beckhoff 2.11 simulation mode

    I don't know if I understand you (sorry, my English is not my best)... But in CodeSys (and of course in TwinCAT), when you want to change the value of a bool/bit variable, you click it with the mouse and you can see how the prepared value gets changed. In order to get the value written or forced to the input this is not enough so you will have to write or force the value. Keep in mind that if you only write it, at the next scan cycle the value (if it depends on an input) it will be overwritten again, so the recommendation in those cases is usually forcing the variable... Notice that even if you force a variable, if during your code you change it's value the force will be lost until the next scan cycle happens. Hope this helps.  
  3. Beckhoff 2.11 simulation mode

    You have to program that in the PLCControl... once you have it programmed then it will work.   Could you explain that a little bit more?
  4. It looks like your EL6751 card can't go to OP mode. If this is happening then it is quite normal that no communication is happening. Remove everything and do the configuration again, search for elements in the EtherCAT bus automatically and then start configuring them via the EDS files. Change addresses, ensure all the speeds are equal and ensure the resistors are correctly placed. Hope this helps (even it is a really short answer).
  5. please help me

    If you want to receive any help, shouldn't you try to make your needs clear? You should tell us the device brand, what you want to do, what you've tried till now, where are you stuck... The more you clarify the easier you'll get an answer. Good luck!
  6. Twincat PLC control

    I've just tested this implementation methodology... Just compiled it and I've seen that the function block can't receive parameters if you work that way... Probably that was their intention but it differs a little bit from what the function blocks are designed... this looks like a "static class" in C++... Of course it has it's reasons, but it is too much constraining: If you don't want to be able to pass parameters to your FB simply don't add INPUT variables. If you want more than one instance of that function block, naming it different than it's own definition name it's mandatory. Can't understand why they've chosen this architecture... they will have their own reasons...
  7. Twincat PLC control

    Didn't know that would even compile... If I've seen it right, you are declaring variables using the same name for the variable itself than for the variable type... What I would recommend you is to use a different name in the variable name than in the variable type e.g.: fb_Verw_P760_TRR : Verw_P760_TRR; PS: If you are declaring variables that way in order to get a special behavior, could you please describe what you get doing that? thanks. Hope this helps.
  8. Twincat PLC control

    Never seen this message in TC2 so I guess you are working in TWinCAT 3. Anyway, I've suffered what this message explains several times: when you change a function block and there are pointers involved the best you can do is rebuilding the project and LOAD ALL in order to start from 0 avoiding misaligned pointers. a problem in your pointers can put your PLC in an invalid state as it can go to a PAGE FAULT. if you face this situation then you can only restart the PLC to continue working. Pointers are extremely powerful, but they have their own problems and you need to be careful when using them. Hope this helps.
  9. Pro-Face problem

    See: Has this made it?
  10. Pro-Face problem

    Years ago it was possible to access the "internal" mode by pressing on three corners at the same time while the display was starting. Don't know if they still keep that method. You could try to do it. Good luck!
  11. connecting c# with TwinCAT

    Hi Nielske, Take a look at this links: Information about connecting TC3 to different high level languages: How to link the ADS library to your C# program: And a nice list of sample code: I hope this will help you. I've still not done that with TC3... only with TC2 and it is a little different so... I'm afraid this is the best I can give you.
  12. OK, that was important... :) Check this help page: Click on Switch Frame variable (red link on the third column of the table under the first image). See the new methodology there. Hope this helps.
  13. If you are using the VISU package from Beckhoff, then you should do this: CurrentVisu := 'NameOfTheVisualization'; CurrentVisu is a string that is declared globally once you enable the visualization in your PLC project. Good luck!
  14. Codesys PID and PWM...?

    Temperature PID have also the negative part just in case you would have a refrigeration system attached to your heating plant. If that is not the case you should be able to parameterize the PID to forget about the negative part. If the PID block you are working with doesn't have this parameter type, take a look at the OSCAT library (WWW.OSCAT.DE), wh¡ch should help you find the right one for you. Adjusting a PID is always the same: P at the beginning until it starts to oscillate, remove a little of P and then start with I and D to fine tune it. In a temperature case you could probably make it with P and I only or even with P only, it will all depend on the desired results. Hope this helps.
  15. learning plcs

    Probably a good starting point would be getting a software that would allow you to simulate things easily inside your own PC. Then testing code and making small programs that you could handle at the beginning. Of course making trainings on how to program, studying a little bit more... could be interesting. Regarding the first point, I'd recommend you to start with something like TWinCAT from Beckhoff (version 2.x unless you come from the IT world and feel ultra-comfortable with Visual Studio). That software will allow you to program with all the programming languages used out there so you will find one that will be easier for you. See examples, put yourself in situations like how would I... and follow the explanations in the help systems and in the sample programs. Of course the best is to test and to program, but you would find it easier if you would have help from an experienced programmer... Good luck!
  16. Lenz vfd

    A resolver is giving you an absolute and single turn measure as it converts the degrees (0..360) where the motor is to the read data. An encoder can be absolute (single or multi turn) and incremental. Take a look at this whitepaper which will explain you the differences between the three measuring systems: Whitepaper Previous note: CALIBRATION or HOMING: this operation must be done with any system that require knowing it's real position and: - when the feedback comes from an incremental encoder. - when the feedback comes from a resolver but we make more than one turn/lap with the motor during the movements. Typically this operation is done with a sensor moving the axis towards the sensor until it changes, then you can set/know the position where you are. Summarizing: - A resolver will give you a degree in each turn so your controller will handle the data as the real degree where the motor is plus the number of turns that have been made to calculate the position. - An incremental encoder will give you pulses while the motor turns and those pulses will be counted by the controller to keep track of the position. - A single turn absolute encoder is typically used to control movements that require only one turn and when you don't want to calibrate the axis. - A multi turn absolute encoder is typically used when you don't want to calibrate. The previous list is ordered from cheap to expensive. Hope this helps you.
  17. TWINCAT Structure to CSV

    Hello again vinny, You should definitely take a look at the P_BinaryModeWrite to get the desired result, if that method is not giving you the correct output as it writes binary information inside the CSV file, then you should go with your approach, but you'll need to make a little bit more of work: As far as I've understood the Beckhoff sample, they are not converting the array to the string and then they start operating with the indexes, they are using in each loop cycle a different array position and then they are converting that position into text. If you want to do that in a CSV and you want to put your text into an excel cell, you should do the same but before converting it into a string, then you should start parsing the structure and concatenate the just-converted strings to put them inside the STRING_TO_CSVFIELD method. This should work, less effort with the binary approach. not so difficult if you do it by yourself tuning a little bit the sample. PS: Keep in mind that depending on the controller type you can be in problems: if that controller has a CFCard or a SDCard, then you can burn the card soon, those devices have a limited number of write cycles. Good luck!
  18. TwinCat chronometer

    Vinny, Even this can work, it has two major drawbacks: - It depends on the parameterized cycle time (if you change the task cycle time then it fails). - Moreover if the task cycle is surpassed (the task takes mor time tan the cycle time to be processed) then it fails. If you are using an old controller (BC, BX...) without a Windows operating system, then you could use a TON and the persistent TIME variable. :thumbsup:
  19. TWINCAT Structure to CSV

    Hello vinny, You should easily do this by following the example in this link: Beckhoff help system link Just in case you can’t, could you explain in detail which are your problems? Good luck!
  20. B&R PLC CP476

    Their software has always been named AUTOMATION STUDIO. The cable you will need will depend of course on the CPU you plan to connect. I've searched their web page and your reference is not appearing there...
  21. Connecting to PLC over Ethernet

    Probably they'll be expensive... if that is the case you could look for a new controller that can natively connect to the LAN. I don't know if that is posible or not... It is always difficult to get those things working... a small mistake in one cable, electrical noises... any small issue and you can't even monitor it and you could lose entire days with that... after time working that way I decided to stop using things without ehternet ports... I'm only using DEVICENET to connect robots to our devices and CANOpen to connect to drives and third party peripherals, but appart of that ETHERNET (EtherCAT) everywhere.
  22. Need Help converting a PLC Program

    It seems Panasonic uses Codesys (no idea of that), you could look at their web page ( and try to find out if they work with Panasonic and keyence... If that would be the case then you could directly use Codesys to translate the code to the new controller. One of the clearest advantages of writting code using ST is that it is easy to copy and paste it... but of course this won't help you a lot. hope you'll succeed with the codesys way...
  23. Interlink two RTU

    Hello N_Locus! The advantage of any fieldbus that is using Ethernet is that you can put switches in between the devices and therefore extend the signal 100 meters each time you add a switch. Moreover testing the cable and finding replacements is much easier... If you want to do it with RTU, then I'd go with RS485 in order to be able to cover long distances (I don't remember which is the maximum). But it is definitely better than RS232. There are displays that are MODBUS MASTERS therefore you could use a display like that to be placed in the middle, just address the display to the right directions and done... Hope this helps.
  24. SLC 5/03 to eWON Cosy 141

    Given the amount of information in your post, I’ve searched the Internet to try to find both references… The first reference SLC 5/03 seems to be an Allen Bradley PLC ( that have 485 and 232 to communicate (without extra modules which I don’t know if you have them). The second reference seems to be an industrial router ( which seem to be able to act as a gateway/bridge. If the eWON COSY 141 works as a gateway and it allows to be configured via the Ethernet ports it has, then you will need only a 232 or 485 cable between both devices. Given, of course, the fact that you’ve configured both to work in the same 232 or 485 protocol. Hope this helps.
  25. Connecting to PLC over Ethernet

    DISCLAIMER: I’ve never used this brand. I’m always using Ethernet connection PLC’s from Beckhoff. After looking around on the Internet a little bit… I’ve been able to see a small PDF file with the specs of your PLC: The PLC supports only RS232 Modbus RTU through RJ12. There is another model that seems to have RS485 like yours. (in the same PDF file there are the extra specs). If you want to be able to remotely connect to the PLC you will need two things: 1. PLC SIDE a. A bridge that will receive/send Modbus RTU through the Ethernet (as you suggest). b. Cable from the PLC to the bridge. 2. PC SIDE: a. A bridge that will receive/send Modbus RTU through the Ethernet (as you suggest). b. Cable from the PC to the bridge. PLC ==== CABLE ==== BRIDGE ------ ETHERNET CABLE ---- BRIDGE ==== CABLE ==== PC Hope this helps.