Search the Community

Showing results for tags 'sample code'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 37 results

  1. Hi every one ! I cannot use register D128 - D255 in the program when I create a program that uses the Block function in the PLC mitsubishi FX1S, it gives an error :  A device of the device range set in the device/label automatic-assign setting or a device which cannot be used due to system reservation is being used.Help me,Thanks !
  2. Folks, we have a set of Mitsubishi Q12PRHCPU (redundant) running effortless since many years. CPU-A as standby and CPU-B as Control. Recently we noticed BATT low alarm on CPU-B. So we arranged for a spare battery Q6BAT and started the procedure as per manual(attached procedure and flow chart). We did memory copy from Control to standby (as prescribed precaution) and did the Reset of Standby PLC CPU-A. Memory copy from B to A completed successfully 100%. But the BACKUP LED did not turn Green from Red & Error LED kept flickering on standby CPU-A. CPU-B remain in Control but backup LED turned RED. From system monitoring we found that there is a Error 6000 (FILE DIFF.) observed in One of the .QPG (program 00-MDBUS.QPG). We tried to reset it but were not successful. We are surprised that why does the program differs when it was copied from CPU-B to CPU-A using the memory copy. Still we did the VERIFY and found no difference between the programs in CPU-A & CPU-B.  Can anyone explain the cause of this issue and the solution. Please note that the CPU-B is still in control and plant is running. Backup LED on both CPU are red which means (redundancy loss) and error LED on standby CPU-A is flickering RED. There is no error in the CPU-A (Control) -we checked this using the GX Developer. Also attached here are the image of the error and error help. Thanks in advance. Battery Replacement procedure.pdf Battery Replacement procedure-Flow Chart.pdf Error.pdf MELSEC QCPU ERROR CODE 6000 FILE DIFF.pdf
  3. Hello, I need to connect multiple barcode readers (SICK CLP510) to a PLC (FX3GE-40M) for a university project. I need a minimum of 3 bar code readers, but only have one operational, connected via an additional modul for the use of rs-232. The only other port I can use is a miniDin 8, which is a build-in rs-422 port. Because this is a university project, it needs to be as cost efficient as posible. All the readers are CLP510 (pin-out attached bellow) Thanks Becky Pin_out___wire_colour___signal_comparison_CLP100_CLP510_CLV60x.pdf
  4. Hello, I need to connect multiple barcode readers (SICK CLP510) to a PLC (FX3GE-40M) for a university project. I need a minimum of 3 bar code readers, but only have one operational, connected via an additional modul for the use of rs-232. The only other port I can use is a miniDin 8, which is a build-in rs-422 port. Because this is a university project, it needs to be as cost efficient as posible. All the readers are CLP510 (pin-out attached bellow) Thanks Becky Pin_out___wire_colour___signal_comparison_CLP100_CLP510_CLV60x.pdf
  5. Hi everyone! I have a question to all of you guys - do you ever use any software or online tools to manage your automation/electrical engineering projects? I have worked in a number of companies and have seen various scenarios, from using excel tables to run multi-million dollar projects to using proprietary SW for every little tiny project. Unfortunately I do not have experience working for any major big integrator and am very curious how projects are managed at this level (and if every engineer likes the way it is handled).  Additional question - does anyone have ever used a software to automatically generate the PLC code? I know some companies develop products to generate the "skeleton" of PLC program and I think it is a great thing to have.
  6. Hello. I am working on a pilot project building an automated RV park. Our goal is to have people sign in online, or in person at a kiosk. Make their reservation, payment, and get their confirmation e-mail. In that e-mail, will be a QR, or Bar Code, that when scanned at the gate opens the gate, and starts a light that flashes at the site they rented. Power will then be turned on at that site, and a timer in the process will begin, based off their rental time. Once their time has expired, the power at the site will be turned off, controlled by a PLC, and relays.  So I am looking for help in all directions. I have some leads on some plug-ins for Wordpress that offer reservations, and other plug-ins that do Bar code production. As far as the web part I have that covered. We can generate a custom barcode, or QR code based on individual rentals and those can be sent to customers. So what I need is someone to help point me in the right direction of equipment that can speak between the online Barcode process and the PLC to allow a process to begin when scanned. Based off their rental parameters their power is turned on or off. Perhaps a SQL query in some form? I haven't used it, but am aware of its capabilities, and this does seem like an application where it would be used. Is there anything that you have used that are tried and true? I know it's a strange request, just hoping someone bites. Thanks in advance for any ideas, I look forward to solving this puzzle, one piece at a time. 
  7. Major Fault

    I have a compact logix with a major fault. Please see my attached file for the complete fault message.  Code 20 array subscript too large. or control data type to large or invalid. Has anyone observed this issue before.  The PLC is a compact logix model.  Every time, the controller is switched from program to run the major fault occurs within 5 seconds.  The fault can be cleared but then it comes back in a few seconds.  I have been told by my tech that no program changes have been made.  Could there be a hardware/wiring issue? Thanks much Document_1234.pdf
  8. Calling a Timer in ST code.

    Dear all, In a state machine I have certain states which need to have a timer to handle timeout errors, that is, if the FSM remains too long in a certain state without getting the conditions to transition to another one, it will produce an error. My current code is using a TOF with an input variable that will be triggered upon entering the state, I call the function block, and then turn the signal off so it starts counting: TRIG_STOP_TIMEOUT := TRUE; TTO_GLOBAL_CYCLE_STOP(IN:= TRIG_STOP_TIMEOUT ,PT:= T#15s ,Q=> ERR_GLOBAL_STOP_TIMEOUT ,ET=> CLK_GLOBAL_CYCLE_STOP ); // TOF TRIG_STOP_TIMEOUT := FALSE; For some reason, the counter does not work. I don't know if I should trigger the signal on in one scan and off on the next. I thought about using the system 1s clock as a trigger (SM412) but the description of the TOF function block states whenever the input is ON, the output will be true, and the timer will only start counting once the input is low. The other thing I thought about was to use the TOF_E instead, with the clock as a trigger, and just set the enable signal when I'm in the state, but I'm not sure it'd work correctly, either. Any suggestions?
  9. This may be more of a Zebra question than a PLC question but I will post it here. I am using Zebra's Network Connect to enable communication between a CompactLogix L13ER and a ZT410. My issue is that the QR Code omits the 5 elements of the array in Field 1 of the CompactLogix. I expect the first two elements in the array to be ignored per the manual but the first 5 has me puzzled. All the characters in the text shows up fine. I have attached what I am seeing. If you have a QR Code reader, you can scan the QR Code.
  10. Sample blocks for S7 1200 plc's

    Hi experts, please share the sample blocks for the EDITABLE TIMER block it should be editable from HMI(Siemens). And also motor run hour block. Actually i am having all blocks in tia v12 version and sadly i dont have the old software to convert it again. So please share the blocks that it shoud be work in TIA V14 for s7 1200 plc's. Please note that the blocks should use add instructions to calculate the time because i don't have much memory.
  11. Change CIP Service Code

    Hi all, This is my first post here, I read through the FAQ, searched the Allen-Bradley forum and this one for my question but couldn't quite find what i was looking for. My main questions is: Is it possible to programmatically change the service code of a MSG instruction?  It is possible to change the class,  instance and attributes but the application I'm currently writing would be a lot simpler if all I had to create is one instance of the MSG block (and its data) . The only thing stopping me is the service code.   Edit: I'm using a CompactLogix 5380-L306ER   Any input is greatly appreciated!
  12. Hello  I am currently trying for testing purposes an Mitsubishi Servo Amplifier M4-J4-TM, which has a Servo motor (also from Mitsubishi) controls to integrate in Beckhoff's TwinCat 3. The controller is directly connected to the computer via EtherCat and is also communication between TwinCat and EtherCAT device is detected. But when I switch to online mode and try to control the engine manually, it always comes the following error message:  Error 51 'TCNC' (500): 'Axis 1' (axis ID: 1): The axis or the drive is not ready for positioning (error code: 0x4225)!  Somehow I miss a step to the valid activation of the engine. ?? In the documentation of Beckhoff and Mitsubishi there is no indication. Actually that should work like that. Has anyone ever had a similar problem and knows about advice? Thanks in advance in advance and many greetings
  13. Hey, I have a 1763 L16BBB...when I plug the 1762IF20F2 analog card in, I get a 0189h error code. Any help would be appreciated. Currently looking at doing a bootp on the plc to get ip
  14. Hello everyone, I'm currently trying to communicate  via ethernet with a Parker drive IPA15-HC. I'm using a 5069-L306ER CompactLogix 5380, revision 30.011. There are add-on instructions that allow you to control the drive, but since they're really basic I'm trying to use message instructions to get more data out of it.  The knowledge base provides a zip named IPA_AOI_Rev4, that includes the add-on instructions and the program you should download to the drive to use them, this is the current file downloaded in the drive. Now, I've tried different msg configurations: CIP Data table read, CIP Data table write, CIP Generic copying the values in the examples and I always get the same:  Error Code: 16#0001 Extended Error Code: 16#0000_0125 That extended error code is nowhere to be found, not in the Logix designer online help and not in rockwell's knowledge base. Any idea?
  15. Hi All, I am pretty new at electrical design for PLC control panels. We are a UL508A shop, so this is the code I refer to most. Something struck me as odd when I was trying to size wire for this control panel. UL508A 28.3.1 says this: The required size of the field wiring terminal shall not be less than 14 AWG (2.1 mm2) and shall be determined by: a) Calculating the required ampacity per 28.3.2 – 28.3.6; and b) Determining the minimum field wiring conductor size from Table 28.1 having a corresponding ampacity that is equal to or greater than the required ampacity from (a). How can the minimum wire size be #14 AWG? We use #16 AWG for wire to the PLC modules? Are we breaking code or is there something I am missing? Also, understanding code books can be difficult. Is there a website or place I can go to get a plain English translation? I feel like I will read a sentence over and over again to try to understand what they are saying, and feel like there's is a much easier way to say it than the way it is written. For example, "28.3.1 b" ……...what is it really saying?  
  16. Hi,  I'm new to TwinCAT 2 and i'm upgrading a long time design (hence the TwinCAT 2 reference), to read a more sensitive torque signal.  I'm using a Beckhoff CX1030 as my PLC Controller.  I needed to add 'homing' to my motor sequence and confirmed with Maxon, im using the function blocks correctly and in the correct sequence to establish my 'absolute zero'/'home' position.  The motor has an output to write to:  ControlWord, which tells the motor that the position it is sitting in is '0.'  My program compiles, it runs, it writes each function block, but it's not seeming to get back to the test run opMode, even though i tell it to and the function block performs the 'Write' function.  it's stuck at zero and not reading an analog input signal from my torque sensor.  so im getting an artificial torque reading through every test.   i think this is related to my tare motion.  I start the program, home the motor, get into profile velocity mode, tare my sensor, enter profile position mode, go back to position 0, then back to profile velocity mode, run a test, sample data, go back to 'home' or '0.'  I wonder 1st, is my variable not linked properly through the system manager?  2nd, i set a boolean variable to set the 4th bit to 1 in my control word write (setting the 4th bit high will set my current position to absolute zero), but did i not connect the program to the main sequence properly?  looking to read a valid signal again and see that my motor moves back to 'home' each time.  Do i not need to home the motor after the tare, since the tare nulls out the torque value after the tare? after this i need to program my sample period, instead of it being fixed, as it is currently written and then use my home position as my trigger to start sampling.... Beckhoff applications department is overloaded, currently and can't help and this is all beyond the knowledge of the general support line.  I've gotten fairly far, on my own, but of course, the project is under a time crunch.   Does anyone know twincat well enough to help guide me?
  17. Hi,     I'm trying to communicate Omron CP1E unit with PC via serial port using hostlink protocol.  I need to read the Timer/Counter SV value and write the timer/counter SV values to the PLC.  I'm able to use other C mode commands (like RC (timer/counter PV read), WC (timer/counter PV write) etc.) but when I give the command for Timer/Counter SV Read 1 which is R#, I get the response as IC (Undefined Command).   How do I write or read the timer SV Values?  Example command and response : @00R#TIMH001028*  (TIMH is the high speed timer, 0010 is the timer number and 28 is the FCS) Response: @00IC4A* Is is that CP1E doesn't support these commands? If so what is the equivalent command that I should send inorder to perform this? Please help.  
  18. Hi everyone - my first post here.  I have a customer with a SLC5/01.  The controller is 1747-L511.  Battery seems good.  The fault LED is flashing.   I tried to connect to it using RSlogix500 and I got this message (photo1).  I selected 'Load From EEPROM' and got this notice. (photo2) Customer has the printed ladder but I can't tell which data types are what. everything is just numbers - no B's, no I's and no O's.  the timers and counters are just numbers too. Luckily the printed ladder has a cover sheet, which led me to the PLC2.(photo3) The rack has two 8 channel inputs and 2 8 channel outputs.  I would like to replace everything with a micrologix 1400 or something, if I could translate the code. Can anyone advise on this matter please?      
  19. good day! I would like to put some ascii code in a device: D3000..D3009 has to be filled with 0x5F54 0x4F5F 0x4150 0x6F73...  ("_TO_APos")  When I fill it using an ascii-input-field in the designer and press "enter" it works. But I would like to put this text automatically in D3000 and following register, when the user press a switch-object. I tried with an 10 actions  "keycode" but I don't see how to say that the key code shouls be saved in D3000. Can somebody tell me the best way to fill more word devices with only one object switch? Thanks in advance   MEBoerner  
  20. Are there any good guide books out there that parse down the NEC to the sections relevant to controls engineering and panel building?
  21. Any body having sample program. Please share.   
  22. FX-3G MODBUS

    fx 3g modbus.gxw
  23. I've been building a contraption with linear rails and stepper motors. It has an X, Y, and Z axis. I'm using Velocio PLCs to control the motors which seems to be work well so far. I understand these are not very common and my question are related to general motion control, not Velocio programming specifically. Since I'm new to PLCs, programming, and stepper motion I thought I'd ask for some input instead of trying to reinvent the wheel. I'm to the point in the build where I'll be adding emergency stop/limit switches and am wondering how to go about writing the program; if there's an "industry standard" way to go about it. I figure the PLC will check to see if any switch is active. If one is, drive the motor away from it till it's inactive and store the location. If one is not, drive the motor until a switch activates then back off a until it's inactive and store the location. Drive the motor to the other limit of the axis (the number of steps should be known) to activate the switch, back off and store location. Rinse and repeat for the other axes. Is my approach about right?
  24. Trying to log into NA HMI, NA5-7U001B  Direct, using USB or Ethernet.  All attempts failed .. tho, it was easy to log into the NJ Controller, direct, with USB or Ethernet using the same PC. Then a window popped up.. saying the firmware needed updating in the HMI, and suggested launching the "update" from the same window... Then, after a few minutes.  a "update failed" was displayed on the window.. and the HMI screen changed to this: ..and the green LED went RED ... aaaaagh!   HMI no longer works... any idea why this happened, or the failure to log in happened.. or, what it will take to fix it? Please tell me it was something Omron did .... Thanks Much, Regards, ,Michael PS:  additional info..  I was using Sysmac Studio Version 1.1 .. because I could log in to the CPU (USB and Ethernet) and not the HMI.. I changed to another PC with Sysmac Studio Version 1.17 .. Now I was only able to log into the CPU with Ethernet.. USB login failed. .. and, so did any attempt to log in to the HMI (USB or Ethernet) It looks like if you use a new version of Sysmac.. better not have a device with  "old firmware" ..  I think it was the V1.17 that presented the window suggesting the Firmware Update ...  sigh!