Chavak

MrPLC Member
  • Content count

    76
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Chavak

  • Rank
    Sparky

Contact Methods

  • ICQ 0
  1. Scale Encoder Reading to 0 to 359

    Thankyou IO_Rack and Bob. Your solution works just fine. Never thought a simple plain division can solve this.   Thank You Best Regards _____________
  2. Scale Encoder Reading to 0 to 359

    No, I guess no option for that. I'm using an Elcis encoder. I was trying to do it in CX-Programmer.   Regards ________
  3. Hi,   I am reading from a 10 bit gray encoder using normal input card and convert it in a CJ2M PLC using GRAY_BIN Now I need to scale the value  which reads 0 to 1023 to a range of 0 to 359. I couldn't figure out how should I go about this. Please help   Thank You Best Regards _____________
  4. String to Real

    Found a search box right below of the toolbox, - very handy to search for Functions, keyed in String and all the string related functions appeared
  5. String to Real

    BTW, how to know the various functions available in the CPU. It doesn't reflect in the toolbox, right? I did look for available instructions in the toolbox
  6. String to Real

    Thank you both of you, I'll try it out.   Regards
  7. String to Real

    Hi,   I am receiving the following string from a serial port - +0153.8 +026.81 +0000.6 +0000.9     Air$R    . I use 'Mid' instruction to separate the bold digits out of the string. Now I need to convert the separated value to Real format. How should I go about doing it? Thank You Regards
  8. Convert DINT to 4 SINT

    Hi Michael, Vasekd, Thank you very much, the logic is working well [i tried it in simulator]. Cheers. Hi Vasekd, Welcome to the forum, Best Regards
  9. Convert DINT to 4 SINT

    Hi Michael, I wish it was that simple. I have noticed the servo side receives the correct data when I do a byte swap [you can see that in the code I attached in previous post, in it - set points bytes 1,2,3 & 4 was swopped to target byte 4,3,2 &1]. When I tested it in CJ2 to Festo servo, I was using XFRB command to swop the bytes from my INT set point data bytes 1 & 2 to the target byte 4 & 3 to make it work. It works fine for axis length up to 327.54mm I have my PLC and servo controller given back to the wiring house to complete the panel, I will get it back only in another 1 weeks time - I will try it out further then. Thank You Best Regards
  10. Convert DINT to 4 SINT

    Hi Michael, Yes, I wanted to break up a DINT into 4 SINT, sorry about the term I used - "convert' . Festo accepts the data in DINT, the trouble was with the Profibus network as its data structure is based on bytes, I have to break it up before I sent. Thank You for being patient with me Best Regards
  11. Convert DINT to 4 SINT

    Hi Michael, Sorry, I forgot to mention the AB PLC which it was implemented was a controllogix series. Being built on 32bit platform it does support, SINT, INT, DINT data types among other data types Attached is the screenshot of the code Thank You Best Regards
  12. Convert DINT to 4 SINT

    Hi Michael, Actually I am doing a floating point multiply and ended up in DINT due to longer stroke length, if I were to limit to INT, my axis stroke length is limited to 327.54mm, nothing beyond with a 2 decimal point accuracy. In fact in my current project I only need an axis length of 200mm max, so using an INT is alright, but I was getting prepared for longer strokes [for expandability of the function] Thank You Best Regards
  13. Convert DINT to 4 SINT

    Hi Michael, Thank you for looking into it. I see using the FIX instruction I can extract the integer portion, but both the integer and decimal portions are important to me.It determine my axis target position. When I tried your example I get 1234 in all 4 D registers. The servo controller accepts the target position in DINT and convert it to real internally. But due to the fact the data is sent over Profibus [which talks in SINT] I need to convert it to SINT. I did several of this application in AB and it works very well. But this time around we are using Omron. Thank You Best Regards
  14. Convert DINT to 4 SINT

    Hi, How do I convert a DINT to 4 separate SINT? - on CJ2M CPU12 I need to sent the target position data over Profibus to a Festo servo controller. I managed to read and decode the actual position data coming from the controller using XFRB and convert it to floating point, but stuck in doing it back. My thoughts were to 1. Convert the target position data [floating point number] into a double integer 2. Split it into four SINT and sent it over network Maybe there are better ways. BTW I am using a Festo CMMS-AS servo controller with profibus. Thank You Best Regards
  15. Multiple Language Setup

    Thankyou very much for explaiing how to do it and what precautions to be taken, I implemented and it seems working well. Best Regards __________