MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by photovoltaic

  1. Omron FQ2 Ethernet/IP comunication with Allen Bradley PLC

    I have used the FH over EIP quite a bit and I think it may be similar on the FQ - did you cycle power on the FQ after changing the EIP settings?
  2. DATE Instruction for CP PLCs View File Sample code to set the RTC on a CP PLC. Individual sections can be enabled/disabled. Submitter photovoltaic Submitted 03/12/21 Category PLC Sample Code
  3. CJ1W-EIP21 to ControlLogix

    Try on the output tag rockwell side, decrease the size by 2 bytes. Rockwell includes extra data in their output datalinks
  4. CJ1W-EIP21 to ControlLogix

    Try this route: create symbols and addresses in CX-Programmer and assign instance IDs with Network Configurator.   In the Logix add a generic ethernet device and give it the IP of the CJ and the instance IDs you created (match datatypes and size).
  5. CJ1W-EIP21 to ControlLogix

    How are you trying to communicate? AB polling CJ? Implicit or explicit?
  6. sequences programming in ladder

    Another way some people do state engines is setting and resetting bits instead of a single numeric variable. The bits can have the name of the state as their tag name and this would get you a lot closer. This a controversial method as it is possible to be in multiple states at once if not programmed correctly. Troubleshooting a situation where this happens can be a headache since they can jump around faster than you can see. I'm all out of ideas, hopefully that helps.
  7. sequences programming in ladder

    The only 2 ways I can think of doing this would be an Enum like you said or a String array. Neither are complete solutions.. With Enum you need to extract a numerical value from the Enum datatype and use conventional comparisons but changing the Enum value would fit what you are trying to achieve. This a sort of a halfway there option. With a dynamically addressed string array you can use string compare instructions and have the states clearly displayed in your logic but this causes a lot of processing overhead compared to a simple numeric comparison. States would still be changed numerically though. I guess you could even use a single String variable and change the string to progress through the stages. Lots of overhead processing again. In my experience a numeric variable is always used and the states are just commented. A multi-dimensional string array is a good way to have the state description readily available for your HMI/SCADA/DCS but I've never seen it used as a core for a state engine.    
  8. sequences programming in ladder

    There are a number of ways to do this and many people have differing opinions. In my experience I find a state engine to be best. This essentially uses a variable to keep track of the state (sequence number) you are currently on. When the state is finished you change the state variable to the next state. Outputs are controlled by the state value. I use this in C and ladder and structured text often. It works well in any language. The state variable can be used to communicate the state to other parts of the program and control the PLCs actions. Since you're familiar with C type languages it would look something like this: State 0 waits for retracted press, State 1 extends press and waits for confirmation, state 2 waits for 5 seconds to pass   // Global variables UINT State = 0; BOOLEAN OUT1; // Press Activate Output BOOLEAN IN1; // Press Extended Sensor Input void LOOP{ if(State==0 & IN1==FALSE){State = 1;} //Press is retracted, move to state 1 if(State==1 & IN1==TRUE){State = 2;}//Press is extended, move to state 2 if(State==2 & Elapsed_Time==5){State=0;}// Press has been down for 5 seconds, move to state 0   //Output Section if(State==0){OUT1 = FALSE;} if(State==1){OUT1 = TRUE;} if(State==2){OUT1 = TRUE;} //Add additional states here } //End void Loop   Will you be using Ladder or ST ?
  9. You may be better off with socket services:
  10. OMRON NS5-SQ10B-V2

    The outer CF slot is the one used for this. Partition the CF card to a 64mb partition, FAT16. I used a cheap Chinese one with no issues.
  11. How to loop a datalog on NA5

    I'm not aware of any, but I'm far from a VB whiz.
  12. Tracking program changes

    What PLC are you using?
  13. CPU Selection

    The NX1P2-1140 can do 4 coordinated plus 4 point to point. I believe this is the cheapest option.
  14. CPU Selection

    Do you need coordinated motion or just 3 independent axis?  
  15. Cpm1a-40cdr-d-v1 Programming cable

    No, it has a converter built into the cable. There is a cable manufactured by a different company for this PLC that you may be able to get in your area: USB-CIF02 These are often on ebay and Amazon etc.
  16. Cpm1a-40cdr-d-v1 Programming cable

    If there is a CPM1-CIF01 currently going to the Peripheral port (has a DB9 connector) then you could make a cable. If it is just the PLC on its own then you need the CQM1-CIF02.
  17. Servo Drive Move Stopped By Mechanical object

    If an object gets in the way with any move instruction it will trip the drive normally. The only way I can think to do this, and it may not be the only way, is to use MC_SetTorqueLimit to do your movements. This is not usually ideal as it negates any position control and just spins the motor as fast as it can as long as your torque is less than the torque set by the function block. I can confirm however that you can stall a motor and it won't trip the drive. You could detect the collision if your torque is at the setpoint limit, you're not at the end of the linear slide, and your position isn't changing. It's been a while since I've used it but I think you can enable a velocity override at the same time and this at least controls your speed. Parameter 3031.01 looks like this will control it as well. You would have to use position comparisons in logic under normal operation to detect if you're at the end of the slide and then stop the movement which may not be ideal and would take some tuning. Like I said there may be another way that I'm not aware of.
  18. Servo Drive Move Stopped By Mechanical object

    Another way you could go is have the BufferMode of the movement instruction set to _mcAborting and keep an eye on the torque and position. When you see the torque pass a value and the position not equal to your target you might be able to execute an MC_ImmediateStop in time or even a relative movement in the opposite direction to relieve some strain on the system. You would have to test this and you might not have enough time before it trips.
  19. PLC CJ1G-CPU45H Problem

    Has the comm port # changed on your PC?  Have you tried forcing a new comm port number from device manager and using that? Are you running the PC program as administrator? Have the DIP switches on the PLC changed?  
  20. Sysmac Studio Improvement Request

    Tools -> Option -> Variables -> Change the variable name used in programs This will fix that behaviour
  21. How to loop a datalog on NA5

    I will clarify a bit - so the folders that this macro looks at are the daily folders, you can have any setting in the update rate and "Start New Database File" section as long as you are saving the data at least once a day. Any longer than that and you need to make adjustments. I think your issue is from the Data Set name - in your multiview explorer under datalogging what did you name your dataset? To test this I would use a button to trigger the script at first. Check how many daily log folders are on your SD card before you do this and then run it say 5 times and then check to see there are 5 fewer folders. Once you confirm operation then have the macro run from global events as an hourly interval.
  22. DATE Instruction for CP PLCs

    Version 1.0.0


    Sample code to set the RTC on a CP PLC. Individual sections can be enabled/disabled.
  23. Sysmac Studio Improvement Request

    It's worth noting that by default it doesn't do this. Sounds like you enabled the option to reflect the changes to variable names
  24. Connection with a CPM2A PLC

    For the HMI you need to put it in transfer mode first. And depending on the version you may need some very old software - I run mine on a windows 98 virtual machine sometimes. Try transfer mode first. As for the PLC - try making a project with the exact CPU type and setting the communication to Sysmac way 9600 7,E,2  (should be the default). Select your com port and try to go online
  25. NB HMI and CP1L-E PLC RTC Setup

    So basically to get your desired operation write the RTC from the HMI to some intermediate registers in the PLC. You will need to do some shuffling around of the data to get it in the right format for the DATE(735) instruction. You'll need all the values in BCD and then pack them into a few words using MOVD(083). The layout is outlined in the instruction help file for DATE(735).