Zamora

MrPLC Member
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Zamora

  • Rank
    Sparky

Profile Information

  • Country Mexico
  1. PLC Mitsubishi - Air low control with sensor

    Good afternoon, I am not really sure I understand your first question, as far as I can tell, you want to increase or decrease the analog output for your VFD in order to match your desired sensor reading. In that case, I would set a certain tolerance range, for example, if your desired value is K260, the tolerance range would be K250~K270. From your second question, let's say that D200 contains the value that will be sent to your analog output and that D100 contains your analog sensor reading. -|< D100 K250|---|SM413|---|INCP D200|- -|> D100 K270|---|SM413|---|DECP D200|- In Mitsubishi Q-Series CPU, SM413 is a flag value that pulsates every certain amount of time. When this pulsates, you will read your analog sensor input and increase or decrease the value of D200, which will be sent to your analog output. You should be careful when determining the polling time based on your system's response time. In this case, I set it to about a second or so, but if your system can't respond quickly enough, you will be constantly overshooting and undershooting your target. For your second question, I'd recommend checking for negative values as well, something like this: -|< D200 K0|---|MOV K0 D8090|- -|>= D200 K0|---|<= D200 K4090|---|MOV D200 D8090|- -|> D200 K4090|----|MOV K4090 D8090|- I hope this information is helpful to you, best regards.    
  2. Error handling with UR polyscope

    Good day everybody, Recently I have been working on an application using a CB-series UR. I have an issue where the robot tries to pick up a piece using a vacuum gripper, and in the case that the robot either doesn't detect the piece, is unable to pick it up or loses grip on it, there needs to be a way to handle this error case and go, for example, to a safety position or turn on an alarm. The problem is that I have been unable to find a correct way to implement this error handling. The best I could do was to just halt the program execution, but this is not satisfactory for this purpose. Does anybody have any tips on how to interrupt the program, switch to a different case or similar? Specifically, I have been working using the Polyscope pendant and have found difficulty programming anything remotely advanced. Thanks in advance!
  3. CC LINK Communication Error

    Please verify that distance is your issue before purchasing and installing a repeater station. As the name implies, a repeater station is meant to extend the transmission distance capability of the CC-Link system. I recommend you look up the manual for "CC-Link System Repeater (T-junction) Module AJ65SBT-RPT" for more information about the module and if this is indeed the right option for you.  
  4. CC LINK Communication Error

    What is the distance between your stations? Maybe you are going over the recommended transmission distance. If this may be the case you could solve the issue by installing repeater stations.
  5. What kind of application are you working on? If you really want to drive the cost down, why not ditch the HMI entirely and go with electric control instead? A couple of dip switches, a 24V power supply and some push buttons may do the trick... From your original post it seems like you only use the HMI to input a numeric value between 0 and 255, and if you want to forego using a PLC you probably aren't monitoring any other IO anyway/
  6. String to Hex

    Good day rhastalei.   The problem is with the order you store the string characters and the order the HEX instruction reads them. To replicate your issue I am using GXWorks2 to simulate a Q03UDE CPU  PLC (Debug Simulation). Sorry I can't share screen captures from this PC, but I'll try my best: -| SM400 |-----[$MOV "DB" D40]-   // Moves the string "DB" to D40, in your case you probably moved "BD", getting the opposite result -| SM400 |-----[$MOV "10" D41]-   // Moves the string "10" to D41, in this case I was not sure if you used "10" or "01" but from your post I took "10" -| SM400 |-----[HEX D40 D50 K3]-   // Converts 3 ASCII characters to HEX value and stores them in D50 From this operation, I get the following results: D40 = 42 44HEX = B D ASCII D41 = 30 31 HEX = 0 1 ASCII D50 = 01BD HEX    Now let's check how the HEX instruction reads ASCII values. GXWorks Help Menu has very useful images to explain this, but here is a quick summary:  It starts by reading the lower 8 bits of D40 (in my case, 44 HEX = "D" ASCII) This value is converted to 4-bit binary representation and stored in the 4 lower bits of D50, bits 0~3 (1101 BIN = D HEX) The instruction reads the upper 8 bits of D0 (in my case, 42 HEX = "B" ASCII) This value is converted to 4-bit binary representation and stored in the next 4 bits of D50, bits 4~7 (1011 BIN = B HEX) Finally, the instruction reads the lower 8 bits of D41 (31 HEX = "1" ASCII) This value is converted to 4-bit binary representation and stored in the next 4 bits of D50, bits 8~B (0001 BIN = 1 HEX) As you can see, we have constructed the HEX value 1BD starting from the least significant digit up to the most significant digit. In your case, you are storing the most significant digit first ("B") and storing the least significant digit last ("1"). Try storing the ASCII String "backwards", start by storing the least significant digit first ("1") and the most significant digit last ("B"). In my case I used this program to get 0BD1 HEX in D50. -| SM400 |-----[$MOV "1D" D40]-   -| SM400 |-----[$MOV "B0" D41]-   -| SM400 |-----[HEX D40 D50 K3]-    Depending on how you are receiving your data, you could make some arrangements using $MOV and SWAP instructions to process your ASCII values before reading them with the HEX instruction. I hope this is helpful, best regards!  
  7. [UPDATE] I managed to get it working again. After rebooting my PC (again), I tried to open KGL_WIN but the program wouldn't even start up. I went into the program properties and set these compatibilities settings: Compatibility Mode: Windows 98/Me Run in 640x480 screen resolution Run this program as administrator Program DPI Use this setting to fix scaling problems Use the DPI that's set for my main display when: I open this program Override high DPI behavior Scaling performed by: Application I hope this is helpful for anybody that may encounter this issue in the future, although this software is so outdated I seriously doubt it, haha! In any case, an important detail may be that I am running Windows 10 on my PC. I'll try to update this post if I find anything else that is useful regarding this topic. Cheers!  
  8. Unable to read comments

    Have you tried changing the language of GX Works? Go to Tool > Language Selection.  Make a backup if possible before you do this, just in case. Also you could try changing Windows Options for non-Unicode programs.
  9. CC LINK Communication Error

    Does it give out a specific error code? Also, what kind of CC-Link module are you using? As sczot stated, I would recommend checking the state of the connectors and cables, maybe you are finding a fault because of a false contact that fails every once in a while. A possible cause may be overlapping station numbers or incorrectly set station switches. Check that the stations are receiving the correct power voltage and that the transmission rates (baud) are set properly. If worse happens, maybe a Master or Slave station is malfunctioning.  If you can, look up the troubleshooting guide for your I/O module. In my case I have QJ6BT11. I am not sure if we can link to these files but it shouldn't be hard to find it online.  In this case, ERR LED status will be useful in checking the problem. Best regards
  10. Analog output doesn't have much issue, just connect GND and your PLC Analog OUT to VR in your Industrial Controller. For your digital outputs I would recommend using relays to avoid connecting the two devices directly. Specially if you are not sure about the functioning of your PLC I/O. As others have stated, your machine can work either way, but it doesn't mean that you shouldn't be careful with the way you connect things to each other. In general, I think NPN logic is better for this case. By the way, Open Drain and Open Collector are almost the same thing, the difference being that one is used in the case of MOSFET and the other one in the case of BJT. Maybe you are thinking about Sinking vs Sourcing I/O? Best regards!
  11. Good day everybody,   I have been having issues with opening KGL_WIN for Windows in general, which as of now have been mostly solved, but I have found in particular that whenever I wish to open the 'Used Device' or 'Device Reference' tabs, the program simply crashes. Previously, these options and the program as a whole worked just right. About KGL_WIN, the current version is KGL_WIN for Windows 3.66, Copyright (C) 1999 LSIS. It appears as a "CLIP MFC Application", but I do not know much about what this means.   I have already tried opening in rebooting my PC multiple times, using compatibility mode (Windows 98/ME), using scaling settings, etc, which have helped open the actual program but not the Device Reference tabs. Unfortunately I am not able to share images from this computer.   Hopefully somebody knows of a way to fix this issue. Thank you in advance.