1st Question: Why and how to use I/O’s communication for SIWAREX U? Answer : Why use I/O communication: Communication via IO area is fast, easy to program with small data volume but complicated programming for large data volume. Communication via SFC is easy to program for large data volume. Attention: Simultaneous use of both communication types is not possible How to use I/O communication: SWAREX U occupies 16 bytes in the I/O area. Eight bytes per channel are available for communication via the I/O area WeighingChannel 1 Byte 0 Read read–identifier (n) for DR(n) and DR(n+1) 1 2 3 4 Write write-identifier m for DR(m) Not yet used Job control Value input(H) acc. w. identifier m Value input(L) acc. w. identifier m 5 6 7 2 S5 Output Area Specified value 1(H) (is transferred cyclically) to remote display Specified value 1(L) (is transferred cyclically) to remote display 8 Read read–identifier (n) for DR(n) and DR(n+1) 9 10 11 12 Write write-identifier m for DR(m) Not yet used Job control Value input(H) acc. w. identifier m Value input(L) acc. w. identifier m 13 14 15 Specified value 2(H) (is transferred cyclically) to remote display Specified value 2(L) (is transferred cyclically) to remote display S5 Input Area Read read–identifier acknowledgment n for DR(n) and DR(n+1) Status byte Weight(H) (is updated cyclically) Weight(L) (is updated cyclically) Value output(H) in acc. w. identifier n Value output(L) in acc. w. identifier n Value output(H) in acc. w. identifier n+1 Value output(L) in acc. w. identifier n+1 Read read–identifier acknowledgment n for DR(n) and DR(n+1) Status byte Weight(H) (is updated cyclically) Weight(L) (is updated cyclically) Value output(H) in acc. w. identifier n Value output(L) in acc. w. identifier n Value output(H) in acc. w. identifier n+1 Value output(L) in acc. w. identifier n+1 The communication between PLC and Siwarex U is realized thru data records. Overview of the Data Records: DR No. S5/S7data records (once per channel) hex. dec. 39 3A 3B 3C 3D 3E 3F 40 41 57 58 59 60 61 62 63 64 65 42 43 44 45 46 66 67 68 69 70 47 71 48 72 49 4A 4B 73 74 75 4C 4D 4E 4F 76 77 78 79 Function Channel Commands Module number Interfaceparameters Agjustment digit 0 Adjustment digit 1 Adjustment weight LED allocation Zero setting value Char. value of LC/ filter/ setting data Limit value 1 on Limit value 1 off Limit value 2 on Limit value 2 off Specification value 1 for TTY Specification value 2 for TTY Remote display type Current digit value Gross Asynchronous errors Synchronous errors Version Checksum Reserved Length Bytes SFC/DS Interfaces E/ A RS 232 EEPROM X X X X X X 2 2 2 2 2 2 2 2 2 - I I/O I/O I/O I/O I/O I/O I/O I/O - No Yes Yes Yes Yes Yes Yes Yes Yes X X X X - 2 2 2 2 2 - I/O I/O I/O I/O I/O - 3) 3) 3) 3) No - 2 - I/O - No - 2 - I/O - Yes X X X 2 2 2 - O O O - No No No X - 2 2 2 2 - O O O O - No No No No 1st Example Read the weight of channel 1 SIWAREX U starting at address 256 L PIW 258 T MW 100 // 256 +2 2nd Example Write the adjustment weight of channel 1 SIWAREX U starting at address 256 L PIB 257 T MB 200 //Read the status byte: L // DR for Adjustment weight (See chapter Commands & Messages) 62 T PQB 257 L 100 T PQW 260 AN M 200.7 = M 10.7 L MB 10 T PQB 259 // Write-identifier for channel 1 is Byte 256 +1 // weight value // Value input for channel 1 is Word 256 +4 // Bit 7 from Status byte // change bit PQ 259.7 to activate the command //State of the job (end) and errors should be checked in the status byte 3rd Example Set as Zero of channel 2 //SIWAREX U starting at address 256 L PIB 265 T MB 200 // Read the status byte: L 57 T PQB 265 L 3 T PQW 268 AN M 200.7 = M 10.7 L MB 10 T PQB 267 //DR for Command //Write identifier for channel 2 is byte 256 +9 //Command for Set as Zero (See chapter Setting to Zero) //Value input for channel 2 is Word 256 +12 //State of the job (end) and errors should be checked in the status byte
© Copyright 2024