Presentation is loading. Please wait.

Presentation is loading. Please wait.

AppsNote: DeviceNet DeviceNet Hardware WAGO - Connectors Connectors on CIP and on DeviceNet Buscoupler GND (bk) 24V (rd) CAN low (bl) shield CAN high (wh)

Similar presentations


Presentation on theme: "AppsNote: DeviceNet DeviceNet Hardware WAGO - Connectors Connectors on CIP and on DeviceNet Buscoupler GND (bk) 24V (rd) CAN low (bl) shield CAN high (wh)"— Presentation transcript:

1 AppsNote: DeviceNet DeviceNet Hardware WAGO - Connectors Connectors on CIP and on DeviceNet Buscoupler GND (bk) 24V (rd) CAN low (bl) shield CAN high (wh) Connect 24V and Ground to Buscoupler and CIP ! (see overview on next page) 120 Ohm resistor between CAN high and CAN low CIP Microstyle Connector, 5 Pin ( refer to MV-Controller User‘s Guide for pinout) Plastiknose for allingning the connector is very sensitiv !! I/O AWC / CIP Master (MACID:default 0) The DeviceNet can have a maximum of 64 Nodes in total (AWC is node 0 and Master by default) 120Ohm On DeviceNet nodes adjust MACID, BAUDRATE by DIP switches 24V, GND - twisted pair CAN Low, CAN High - twisted pair On AWC adjust LOCAL_ID statement using "config_c": MACID 0..63, BAUDRATE 125kBaud, 250kBaud, or 500kBaud

2 AppsNote: DeviceNet DeviceNet Hardware WAGO - Overview Buscoupler 2 Output- Modules 2 Input- Modules End module 24V and Ground supply for DeviceNet-Bus and Bridge to 24V and GND trails (going through all modules) 24V and Ground available on all modules 120 Ohm resistor between CANHigh und CAN Low 24V and Ground supply for DeviceNet-Master (AWC / CIP) * There are modules for galvanic separation, that allow to apply different voltages for switching. DIP-switches for MACID and BAUDrate *

3 AppsNote: DeviceNet DeviceNet Software (Monitor-Commands) Monitorcommand :.devicenet check the Devicenet-Status, (compare to Net-Command for TCP/IP) „new system“- no DeviceNet configured, yet. Powerup problem: The DeviceNet Chip on the AWC (s.o.) isn‘t initialized in a controlled manner during system bootup. The DeviceNet Buscoupler may go into error condition for that reason (red BUS OFF LED on buscoupler is going on). Recommendation: Not all DeviceNet components supply an automatic Error- Reset that re-initialize communication after 20 sec. Switch on 24V-voltage for DeviceNet logic by relais after bootup of the AWC. Monitorcommand / V+Instruction : (undocumented).dn.restart Reset of DeviceNet communication (takes around 20 sec) OK: D13 Siemens (Infineon) Germany New since V G3, 13.1 J6, 13.1 S2, 13.1 D3 and 14.0 G2 a counter for „Missed packets“. Accessable from V+ with: FCMND(lun,761) ““,$input can.lost = INTB($input, 11) faulty: E12 from Taiwan

4 AppsNote: DeviceNet DeviceNet configuration - SCAN THE DEVICENET Scan the DeviceNet: Memorize these informations, as they are needed for subsequent DeviceNet configurations. Input size, Output size: In general those two values represent the numbers of Input or Output BYTES available on a DN node with a certain MAC ID. Each Input or Output module of the WAGO hardware (see overview) contains four Inputs / Outputs (= 4 Bit). Values for Input and Output size are rounded to the next full Byte. Attention: The scan result for Input size is missleading, as the buscoupler is marked as one additional Input-byte. Example: Wago Node with 3 Input- and 5 Output-modules: (In total 12 Inputs and 20 Outputs) Input size = 2 Bytes (rounded) + 1 Byte (coupler) = 3 Output size = 3 Bytes (rounded) Set by DIP switches on Buscoupler If problems occur during scan, check if 24V/GND is connected to the DeviceNet logic (connector on Buscoupler) AND to the DNMaster on the AWC (connector on CIP)

5 AppsNote: DeviceNet DeviceNet configuration - LOCAL, MACID Address (MACID) of DeviceNet Master (AWC) default=0 DeviceNet scanner speed. MUST meet the DIP switch settings of all DeviceNet nodes. Insert results from previous DN scan here If a DeviceNet Node has Inputs that are relevant for the system safety, it can be told to force a High Power Disable with this statement.. In case of this error, the V+ errorhandling could execute the DN.RESTART instruction (only for DN components w/ automatic error reset), or switch off and on the 24V suply for the DeviceNet logic.

6 AppsNote: DeviceNet DeviceNet configuration - I/OMapping 24V GND Input-Mapping (mapping nr. 2 ): On DeviceNet node #1 (MACID 1), starting from Data-Byte#1 *, first bit, define the next eight inputs ( )** On DeviceNet node #1 (MACID 1), starting from Byte#1, first bit, define the next eight outputs ( )** Output-Mapping (mapping nr. 1 ): * the /BYTE part of an input-mapping statement only refers to the Data-Bytes (the additional Inputbyte of the Buscoupler, shown during the scan, is disregarded here !) 2 x 4 Inputs 2 x 4 Outputs ** the IO mapping can be split (even within a single module).

7 AppsNote: DeviceNet DeviceNet - V+ Sample Code - Read common DeviceNet status ATTACH (dn_lun, 4) "devicenet" TYPE "IOSTAT of DN ATTACH: ", IOSTAT(dn_lun,0), " ", $ERROR(IOSTAT(dn_lun,0)) ; read DeviceNet status (see V+ LRG) FCMND (dn_lun, 761) "", $input TYPE "IOSTAT of dn_stat: ", IOSTAT(dn_lun,0), " ", $ERROR(IOSTAT(dn_lun,0)) TYPE /C1, "*********** DeviceNet Status *************" status = INTB($input,1) ; status bits IF status < 0 THEN status = status END CASE TRUE OF VALUE (status BAND ^B1) == 1: TYPE "Online" VALUE (status BAND ^B10) == 2: TYPE "Bus warning" VALUE (status BAND ^B100) == 4: TYPE "Bus off" VALUE (status BAND ^B1000) == 8: TYPE "Activity detected" VALUE (status BAND ^B100000) == 32: TYPE "Transmit timeout" VALUE (status BAND ^B ) == 64: TYPE "Receive buffer overrun" VALUE (status BAND ^B ) == 4096: TYPE "Online at 125 KBaud" VALUE (status BAND ^B ) == 8192: TYPE "Online at 250 KBaud" VALUE (status BAND ^B ) == 16384: TYPE "Online at 500 KBaud" VALUE (status BAND ^B ) == 32768: TYPE "Scanner active", /C1 END TYPE TYPE "Number of bytes transmitted: ", INTB($input,3) TYPE "Number of acknowledges received: ", INTB($input,5) TYPE "Number of bytes received: ", INTB($input,7) TYPE "Number of errors: ", INTB($input,9) TYPE "Number of bytes lost: ", INTB($input,11) TYPE "Number of overruns ", INTB($input,13) TYPE "******** End of DeviceNet Status *********" TYPE DETACH (dn_lun) TYPE "IOSTAT of DN DETACH: ", IOSTAT(dn_lun,0), " ", ERROR(IOSTAT(dn_lun,0))

8 AppsNote: DeviceNet DeviceNet - V+ Sample Code - Read MACID status AUTO macid, status, $error[25] $error[0] = "Device not in device list" $error[1] = "Device idle (not being scanned)" $error[2] = "Device being scanned" $error[3] = "Device timed-out" $error[4] = "UCMM connection error" $error[5] = "Master/Slave connection set is busy" $error[6] = "Error allocating Master/Slave connection set" $error[7] = "Invalid vendor id" $error[8] = "Error reading vendor id" $error[9] = "Invalid device type" $error[10] = "Error reading device type" $error[11] = "Invalid product code" $error[12] = "Error reading product code" $error[13] = "Invalid I/O connection 1 input size" $error[14] = "Error reading I/O connection 1 input size" $error[15] = "Invalid I/O connection 1 output size" $error[16] = "Error reading I/O connection 1 output size" $error[17] = "Invalid I/O connection 2 input size" $error[18] = "Error reading I/O connection 2 input size" $error[19] = "Invalid I/O connection 2 output size" $error[20] = "Error reading I/O connection 2 output size" $error[21] = "Error setting I/O connection 1 packet rate" $error[22] = "Error setting I/O connection 2 packet rate" $error[23] = "M/S connection set sync fault" macid = 1 ;MACID 1 for instance ATTACH(lun,4) "DEVICENET" ;Get STATUS of a named MAC_ID (undocumented so far) FCMND(lun, 760) $INTB(macid), $input IF IOSTAT(lun) < 0 THEN TYPE "No MacId ", macid ELSE status = ASC($input, 1) TYPE "MacID ", macid, "status is ", $error[status] END Analyze the DeviceNet Bus by gathering informations from the nodes.


Download ppt "AppsNote: DeviceNet DeviceNet Hardware WAGO - Connectors Connectors on CIP and on DeviceNet Buscoupler GND (bk) 24V (rd) CAN low (bl) shield CAN high (wh)"

Similar presentations


Ads by Google