Need Help! Reading external IO


Results 1 to 12 of 12

Thread: Reading external IO

  1. #1
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Reading external IO

    Hi,

    I have a SIEG CNC Mill Machine that uses a "KT510-M-KT-UK" controller by Shanghai Electric.

    I need some help with reading the external IO to trigger the programme.

    Reading external IO-cnc-diagnose-page-png

    The picture shown is the diagnose page of the programme that comes with the machine. X0 - X3 are the input signals and Y0 - Y2 are the output signals. X2.0 to X2.3 are extended inputs usable by the users. To confirm that they are mapped, I applied a 24+V to the physical IO of all the inputs and confirmed that X2.0 to X2.3 "lights" up in the diagnose page.

    I would like to write a macro program to read the Input signals of X2.0 - X2.3. However I am not able to find address in which X2.0 to X2.3 are mapped.

    Hopping that the controller KT510 is mapped similarly to FANUC controllers, I have tried:

    N01 IF [#1000 EQ 1] GOTO 300
    N02 M10
    N300 M11

    I understand that in FANUC, #1000 - #1031 are system variables, and are not visible. Therefore I used an IF statement to jump N300 and trigger the door to be opened (M11), when #1000 is high "1". I have tried reading from #1000 - #1031. And noticed that #1000 and #1008 was pre-set to high, and the program jumps to 300. However, I do not know how is #1000 and #1008 is programmed or set. Nothing I do influence #1000 or #1008. I believe that #1000 and #1008 is being used as macros by the maker SIEG.

    Therefore I extended my search from #1000 - #1100. But still could not identify the address of the mapped input. (only #1000 and #1008 were read as high)

    The operating and programming manual provided by SIEG do not include any info about extended input output address.

    Is there any other way for me to find the address that maps to the extended I/O's ?

    I have referred to this pdf file.

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Reading external IO-interface-signals-details-pdf  


  2. #2
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Look into the diagnostic page you posted. It lets you know which X-address is used for what purpose and which ones are free.

    You would need to add a rung into the ladder for using unused X-addresses, as described in the pdf you attached:

    In order to communicate an external signal to the CNC, the corresponding
    X-signal will need to be written to the appropriate G-signal
    (G54.0 to G54.7 and G55.0 to G55.7 are reserved for this purpose). This
    can be done by adding a new rung to the PMC ladder:
    X_·_ G_·_
    |----| |---------------------------------------------------------------------------( )----|
    This defines a system variable (corresponding to the specified G address),
    which can be read in a program. For example, when X0.0
    (assuming the MTB has not used this address) is written to G54.0
    (which corresponds to variable #1000), it defines variable #1000
    (which becomes 0 or 1 depending on whether X0.0 is low or high).
    Variable #1000 can be read in a program. Thus, the ON/OFF state of
    an external sensor becomes available inside the program.



  3. #3
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by sinha_nsit View Post
    Look into the diagnostic page you posted. It lets you know which X-address is used for what purpose and which ones are free.

    You would need to add a rung into the ladder for using unused X-addresses, as described in the pdf you attached:

    In order to communicate an external signal to the CNC, the corresponding
    X-signal will need to be written to the appropriate G-signal
    (G54.0 to G54.7 and G55.0 to G55.7 are reserved for this purpose). This
    can be done by adding a new rung to the PMC ladder:
    X_·_ G_·_
    |----| |---------------------------------------------------------------------------( )----|
    This defines a system variable (corresponding to the specified G address),
    which can be read in a program. For example, when X0.0
    (assuming the MTB has not used this address) is written to G54.0
    (which corresponds to variable #1000), it defines variable #1000
    (which becomes 0 or 1 depending on whether X0.0 is low or high).
    Variable #1000 can be read in a program. Thus, the ON/OFF state of
    an external sensor becomes available inside the program.

    Hello Sinha_nsit,

    Thanks for your help. According to the diagnose page X2.0 to X2.3 is free.

    There isn't any tools that allow me to add new rung or ladder.

    G53 Machine coordinate system selection

    G54* Workpiece coordinate system 1 selection

    G55 Workpiece coordinate system 2 selection

    G56 Workpiece coordinate system 3 selection

    G57 Workpiece coordinate system 4 selection

    G58 Workpiece coordinate system 5 selection

    G59 Workpiece coordinate system 6 selection

    G53 to G59 is being used as shown above.

    As you mentioned, #1000 correspond to X0.0, there can i know which variable # is corresponding to X2.0 to X2.30

    Hope to get a reply from you soon. Thank you.

    Sambal



  4. #4
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Look into the ladder and search for X2.0 etc. There might be a rung defining some G-signal using X2.0. Look into the table given in your pdf to find out which system variable (#1000 series) this G-signal corresponds to.

    X0.0 may or may not correspond to #1000. It depends on how the ladder is written.



  5. #5
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by sinha_nsit View Post
    Look into the ladder and search for X2.0 etc. There might be a rung defining some G-signal using X2.0. Look into the table given in your pdf to find out which system variable (#1000 series) this G-signal corresponds to.

    X0.0 may or may not correspond to #1000. It depends on how the ladder is written.
    Hello sinha_nsit,

    Thank you again for your reply. The programme doesn't come with any options for me to view or edit into the ladder.

    The PDF given also do not provide any table relate to system variable.

    You can view the given programming manual here:

    https://drive.google.com/file/d/0B8F...it?usp=sharing

    Thanks



  6. #6
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    I was talking about table 3.1 of the pdf. It, however, may not apply to your control which is not Fanuc.
    Your manual does not give any information about system variables. You need to contact the manufacturer for information about ladder and system variables.



  7. #7
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by sinha_nsit View Post
    I was talking about table 3.1 of the pdf. It, however, may not apply to your control which is not Fanuc.
    Your manual does not give any information about system variables. You need to contact the manufacturer for information about ladder and system variables.
    Hello again sinha_nsit,

    I have asked them before, unfortunately they do not know the address as well.

    Is there any other way than to refer to the ladder diagram?

    Thanks.



  8. #8
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    By trial and error.
    Apply +24 to each free input terminal one by one and check the 0/1 status of all the #1000 series variables.
    This would actually not work:
    N01 IF [#1000 EQ 1] GOTO 300
    N02 M10
    N300 M11
    Even if #1000 is 0, M11 may be executed, ignoring M10 (depends on how the control is designed). Therefore, insert a GOTO after N02 to skip N300.



  9. #9
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by sinha_nsit View Post
    By trial and error.
    Apply +24 to each free input terminal one by one and check the 0/1 status of all the #1000 series variables.
    This would actually not work:
    N01 IF [#1000 EQ 1] GOTO 300
    N02 M10
    N300 M11
    Even if #1000 is 0, M11 may be executed, ignoring M10 (depends on how the control is designed). Therefore, insert a GOTO after N02 to skip N300.
    Hello sinha_nsit,

    My purpose of that code is to skip N02 M10 if 1000 EQ 1. If M10 is not skip, means that #1000 is 0.

    I have tried from #1000 to #1100, however they are not. Is there any other system variables which is not in the range of #1000?



  10. #10
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Has the manufacturer given any macro-programming manual (they might have named it differently)?
    If they have no idea of the feature you are looking for, it is possibly not there.



  11. #11
    Registered
    Join Date
    May 2014
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by sinha_nsit View Post
    Has the manufacturer given any macro-programming manual (they might have named it differently)?
    If they have no idea of the feature you are looking for, it is possibly not there.
    Hello Sinha,

    Thanks for your reply. As you have suggested, it is not there.

    I contacted the controller manufacturer directly and they have helped to include a new ladder rung into my CNC programme.

    Thank you for your help.



  12. #12
    Member benmeyer's Avatar
    Join Date
    Mar 2019
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: Reading external IO

    Quote Originally Posted by Sambal View Post
    Hello Sinha,

    Thanks for your reply. As you have suggested, it is not there.

    I contacted the controller manufacturer directly and they have helped to include a new ladder rung into my CNC programme.

    Thank you for your help.
    I am also trying to implement a method to write to the I/O (Y0.4 will do) and read a few bits but have had a similar experience with the manufacturer.
    The controller manufacturer has not responded.
    Can you share their feedback and your ladder file? It would be much appreciated.
    I was hoping to map an unused M-code to an output bit to use it to turn on a laser burner.

    regards Ben.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Reading external IO

Reading external IO