tingxing

MrPLC Member
  • Content count

    61
  • Joined

  • Last visited

Everything posted by tingxing

  1. Omron Bit Set Instruction (vs. Mitsubishi PLC)

    Thank you all very much! Yes, I am using the current CJ2M cpu's. for SETB W0 D0 if D0 = 128, will W8.0 be set? I mean, will the set operation span out to more than the one word(16bit) ? Xing
  2. Thank you very much for your reply. I am sure overwritten did not happen -> instead of sending once, I sent for several times, every time less than 20 words, it is OK. And there is no error code from PLC -> it seems CPU just overlooks the data packets. I asked Mitsubishi, they said there wont be any error code, or any error flag kept in CPU, it just appears nothing happened. One Mitsubishi support technician confirmed to me that this has nothing related to CPU settings, and advised me to check "TCP Maximum Segment Size". I use Windows 7, and know nothing about where to check the "TCP Maximum Segment Size" setting. Since I did no modification to my Windows network settings, I guess the default setting will not be too small to satisfy my moderate tcp datagrams. Thank you, and happy new year. Xing
  3. Could anyone tell me how to do integral calculation in Omron PLC? I get power (in fact, current) data, and I want to calculate power vs time integration. Thanks in advance. Xing
  4. Hello, I wonder if in some cases servo motor can be replaced with induction motor + encoder. Because my primary concern is position accuracy, if the encoder is accurate enough, can stop position be adjusted anyway? I dont care much about speed. I expect to cut some cost by using this configuration. Thanks in advance. Ting
  5. TCP Communication Response Time

    I have asked Mitsubishi online, and they said their CPU's TCP implementation has push bit set to "1" ! I am now asking them if they got the data of repose time of communicating with windows PC, especially when reading 1 word from some device. Xing
  6. TCP Communication Response Time

    Hello, I try to setup TCP communication between a PC and Q CPU using MC protocol (3E Ascii). My problem is, I found the communication response time is rather long: about 250ms - completely not negligible. To be specific, the response delay is found to be the time between send over and when data available at the TCP stream. Is this related to some setting at the Q CPU side? Many thanks in advance. Ting
  7. TCP Communication Response Time

    Sure, I also tell from the data, there are only tens of millisecs. I have to check it further. I tried to downsize the receive buffer of my Tcpclient, and change the NoDelay setting and so on. I think there must be a solution available - 250 ms is just unbearable! Xing
  8. TCP Communication Response Time

    I tried to monitor it with wireshark, the following is the monitoring result for ZR device read (only 1 word): 10 7.855994000 192.168.31.20 192.168.31.10 TCP 96 imgames > blackjack [PSH, ACK] Seq=2 Ack=1 Win=65535 Len=42 11 7.874295000 192.168.31.10 192.168.31.20 TCP 80 blackjack > imgames [PSH, ACK] Seq=1 Ack=44 Win=5840 Len=26 *500000FF03FF000018000104010000ZR0027ED0001D00000FF03FF00000800000025 the Len=42 message is what I sent to PLC, and the next line is what I received. There is not too much delay in response ? Xing
  9. TCP Communication Response Time

    I think there is no problem with response code. If there is anything wrong, the returned error code will be received. Because my return code is 0000, everything is right. I did some earch, and discussion indicate "IgnorePushBitOnReceives" of windows system is a cause. But even if I have changed the IgnorePushBitOnReceives to 1, there is no improvement. Xing
  10. TCP Communication Response Time

    Thank you very much for your analysis Kaare. It is not I do want to open the code, but because it is not strictly modular and hard to extract. The segment related to TCP communication is merely a use of Tcpclient of .Net 3.5. I just 1. establish connection ( at the initialization stage of my C# program) when it is time to do communication: 2. send communcation test 3. wait for response ready, which is tcpclient::GetStream().DataAvailable I dont close the connection until my program exits. And I am not using MX component. I assemble MC protocol communication text from scratch: it is not very complicated. And because even though there was delay, I got proper response from PLC, I think there is not anything wrong with the usage of MC protocol. Xing
  11. TCP Communication Response Time

    I have tested, to set the timeout to 500, or even 0, the delay time is almost the same, 250ms. Because I am reading ZR, I tried to read a different kind of device: D", it turned out to be the same. Really queer. For a large block of data, there wont be more delay due to TCP speed. But this delay is really annoying, it restricts my access to PLC data only 4 times per second. Xing
  12. TCP Communication Response Time

    The communication is OK - ZR device was successfully read. I checked and found, it almost took no time until sending over. But after send over(by PC) and before data available at the tcpclient of PC, almost 250 ms elapsed. Xing
  13. TCP Communication Response Time

    I use C# (.net 3.5) tcpclient component. As for the 3E frame, there is a field for timeout whose unit is 250ms (1=250ms, 2=500ms...). Really I set the value to 1. But it seems this should not be the reason for the nearly 250ms delay, it should only be a timeout value. I also think the PLC cpu should not have taken so long to respond. Xing
  14. Output vs SETB

    Hello, Please give advice for my following newbie question: In PLC's ladder rung, if I want to set a bit of for example, W100.0, I can put W100.0 as an output at the last part of a rung. But I can also put an instruction, SETB W100,0. I wonder whats the difference? In my program, I have to set/reset W100.0. But if multiple W100.0 are used as output, there will be warning. Thanks in advance. Ting
  15. Output vs SETB

    Thank you very much. Now I see the "out" coil is a common practice. The reason I use SETB is because A. when some conditions are satisfied, the bit should be 1, and B. when some other conditions satisfied the bit should be 0. Since out coil for me is basically "on" oriented - it seems to me that I have to arrange parameters to let the coil turn on. So if it is coil instead of SET/RSTB, I have to NOT the conditions of B. This seems awkward for me, or maybe I'd better introduce intermediate variables. Ting
  16. Hello, Our system have several heaters, and I have to monitor the heating current. Current Transformer(CT) is used together with CT transmitter. I find CT transmitter is quite expensive, comparing to CT itself. Then I am trying to share a CT transmitter with multiple CT by using solid state relay (or any suitable switch). Is this feasible ? Thank in advance. Ting
  17. replace servo motor with induction motor + encoder

    Thank you! My position control is realized only by reading the feedback from encoder. Just as you pointed out, slow down near the stop is a solution. Though not as good as closed loop, correction can be done according to encoder feedback, which might be just a kind of "close loop". 1024 pulse might be good enough - if 1 degree is necessary, 1024 division offers 360/1024= 0.35 degree resolution. where can I find some tutorial like materials so as to know how to use the devices(inverter) you recommended? Ting
  18. replace servo motor with induction motor + encoder

    Thank you very much! I am new to inverter. Our current configuration depends on the encoder feedback to understand the position. I am afraid your recommendation might be expensive. Previously Servo was used, and position control seemed not to be a problem. when we begin to use an induction motor, position problem arises probably due to rotation can not stop immediately. A solution is to use other motors with "brake" function. But , I think this wont be necessary, because it seems we can compensate the error. 1 degree resolution is good enough, but now we are using E6C3-A, with 1024 divisions. Is E6C3A enough? Ting
  19. Servo and induction motor

    Thanks a lot! I will check the material you advised first.
  20. Servo and induction motor

    Hello, I have a question about motor, more exactly - servo motor and induction motor. We have been using servo when angle control is necessary. Recently someone said induction with brake can do the same thing. Because servo motor is expensive, it seems attractive to use such kind induction motors instead. How about the idea? where can I get more information? Thanks in advance. Ting
  21. PID setting

    Hello, I am using PIDAT instruction to control a simple heater system. A big problem with the heater is that, even if MV is cut to zero, temperature PV will still rises for some degrees! How to set the P, I, D parameters? Currently I am testing relatively small P (5%), and big I and D parameters. But have not found a good parameter set. What I expect most is that, the MV will be able to fall to zero long before PV approaches SV. Otherwise, a big overshoot is inevitable. Would you please give me some advice? Thanks in advance. Ting
  22. PID setting

    Thank you very much. (I am late) Thank you very much for your valuable advice. According to my tests, a small P seems necessary - PID output will decrease sensitively as PV approaches SV, while a big P makes the response inactive, which is the very reason of overshoot. A big P probably also works, but might take long time if overshoot be suppressed. Ting
  23. PID instruction: bit 03 of C+5

    Hello, I am trying to use PID instruction (PIDAT). I have a question about the usage of bit 03 of C+5, i.e. "Manipulated variable output designation". And the manual states it "Designates the manipulated variable output for when the PV equals the SV." And also said 0 means output 0%, and 1 means 50%. I did some experiments, and could not discern any difference between using or disabling the bit. What actual effect will be there if I set the bit to 0 or 1? Thanks in advance. Ting
  24. PID control

    Hello, I want to know if there is any good method to do PID control without using loop controller. I want to control temperature and pressure PID control. Because loop controller is expensive, is there any other alternative method? Ting
  25. PID control

    Thank you very much. You reassure me that LCU is for some complicated scenario, and a simple PID control loop would be done by PID instruction. My control loop is a single simple loop - tune the valve according to the difference of pressure's setting value and current value. According to your advice, the PID instruction is just for this, is it? Ting