12.07.2015 Views

CAN- and PROFIBUS - Sorcus

CAN- and PROFIBUS - Sorcus

CAN- and PROFIBUS - Sorcus

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Intelligent Solutions for PCs<strong>CAN</strong> <strong>and</strong> <strong>PROFIBUS</strong>Communication with PCs <strong>and</strong> PC/1041


Communicationwith <strong>PROFIBUS</strong> <strong>and</strong> <strong>CAN</strong>-Bus<strong>PROFIBUS</strong>:The acknowledged st<strong>and</strong>ard for fieldbus applicationsThis open field bus st<strong>and</strong>ard has becomethe accepted choice in many sectors of industry,like automation systems for productionlines, processes <strong>and</strong> buildings. Sensors<strong>and</strong> actuators from a variety of manufacturerscommunicate with each other over ast<strong>and</strong>ardized bus. The <strong>PROFIBUS</strong>-DP (decentralizedperipherals) variant is particularlysuitable for fast communication with decentralizedperipherals.The <strong>PROFIBUS</strong> master manages the activitiestaking place on the bus. <strong>PROFIBUS</strong> possessesmulti-master capability. A mastertransmits messages (without an externalrequest) to the passive slaves connected tothe <strong>PROFIBUS</strong>, the slaves concerned receivedata <strong>and</strong> comm<strong>and</strong>s <strong>and</strong> in turn transmitdata to the master.A <strong>PROFIBUS</strong> system consists of at leastone master <strong>and</strong> up to 123 slaves. Slave stationsfor a host of widely varying automationapplications are available from a largenumber of manufacturers. In addition tost<strong>and</strong>ard I/O slaves, like analog <strong>and</strong> digitalinputs <strong>and</strong> outputs of the ET200 type(drives, valves, rotary transducers), completePLC control systems (of the Siemenstypes S5 <strong>and</strong> S7) can also be connected, forinstance.<strong>CAN</strong>:On the fast track even without a carTo get the ever increasing amount of electronics<strong>and</strong> cables in modern-day vehiclesunder control, the <strong>CAN</strong> (Controller Area Network)st<strong>and</strong>ard has been developed. Thisinexpensive message-driven network protocolhas not only gained a firm foothold in theautomotive industry but is also being increasinglyused as a field bus system in automationengineering.Setpoint <strong>and</strong> actual values, diagnostic data<strong>and</strong> other line/system parameters can beexchanged with the other nodes on the busby means of <strong>CAN</strong> messages. Nodes aredesignated by what is called an identifier(ID). The user data are transmitted togetherwith the identifier concerned. The nodesuse the ID as a criterion to verify whetherthe message in question is of interest tothem or not. The ID also specifies amessage’s priority on the <strong>CAN</strong> bus.Serial communicationIn addition to the genuine field bus components,SORCUS also offers st<strong>and</strong>ard interfaceslike RS-232, RS-422, RS-485, 20 mA,optical-fiber-link interfaces, etc. for any desiredsynchronous <strong>and</strong>asynchronous communicationtasks. St<strong>and</strong>ardprotocols, e.g. 3964/R,are likewise available.2


The “large” MODULAR-4/486The SORCUS concept:intelligent solutionsThe SORCUS solutions are based on theintelligent MODULAR-4/486 carrier boards,which have proved their worth many timesover in industrial applications, <strong>and</strong> on Multi-COM boards. A MODULAR-4/486 carrierboard accommodates a complete computerwith powerful hardware <strong>and</strong> software, plusa series of module slots enabling the boardsto be customized for an extremely widerange of requirements: there are about 50different I/O modules <strong>and</strong> communicationmodules for almost every application. Amaximum number of 9 modules of this typecan be plugged onto a MODULAR-4/486board, for implementing sophisticated,multi-channel instrumentation <strong>and</strong> controljobs as well as high-performance communicationtasks.For example, a MODULAR-4/486 board canbe exp<strong>and</strong>ed to become a <strong>PROFIBUS</strong>-DPmaster, a <strong>CAN</strong> node <strong>and</strong>/or a fast data-acquisitionboard for analog <strong>and</strong> digitalsignals. Note that theboard’s use ishere not restrictedto one particular application: themodules can be combined at will.In addition to st<strong>and</strong>ard software packageslike ARGUS, DIAdem, DASYLab, etc., drivers<strong>and</strong> libraries are also provided, enablingusers to create their own programs. TheOsX multi-tasking real-time operatingsystem from SORCUS runs on the board.There is an option for developing userspecificsoftware both for the PC <strong>and</strong> for thereal-time operating system of theMODULAR-4/486 or Multi-COM. Real-timeprograms free the PC entirely from all protocol-related,measuring <strong>and</strong> control tasks,since the boards’ integrated computer,which consists of a 486 or 586 CPU, a RAM,a ROM <strong>and</strong> other peripherals, works in completeindependence of the PC.The MODULAR-4/486 <strong>and</strong> the Multi-COMwill convert any PC into a genuine parallelcomputer system, with the PC in this configurationh<strong>and</strong>ling visualization, evaluation<strong>and</strong> data storage tasks.The applications for the MODULAR-4/486<strong>and</strong> Multi-COM boards can be developed bythe user in a high-level language (e.g. C,C++, Pascal, Visual Basic). This also appliesto the real-time programs on theboard <strong>and</strong> to PC programs.You can useup to eightboards simultaneouslyinone PC. And anoption for st<strong>and</strong>aloneboard operationis also provided.Multi-COMMODULAR-4/486■ Intelligent PC board with its own CPU,RAM, ROM <strong>and</strong> peripherals■ The board’s local CPU works in parallel tothe PC■ Available with 486 or 586 CPU, up to 133MHz■ Up to 34 MByte RAM■ Real-time, multi-tasking OsX operatingsystem on-board■ Option for st<strong>and</strong>-alone operation■ 2 serial RS-232 interfaces■ 2, 4 or 9 module slots■ 6 timers■ Real-time clock <strong>and</strong> date■ Drivers for all commonly used PC operatingsystems (DOS, Win 3.x, Win 95 <strong>and</strong>98, Win NT)Multi-COM■ Intelligent PC board with its own CPU,RAM, ROM <strong>and</strong> peripherals■ 6 serial interfaces, 5 of which can be configuredby means of one S-Link perchannel■ S-Links available for: RS-232, RS-422,RS-485, 20 mA, <strong>CAN</strong>, SSI (2 channels),optical-fiber links, in each case with orwithout electrical isolation■ The board’s local CPU works in parallel tothe PC■ Available with 486 or 586 CPU, up to 133MHz■ Up to 34 MByte RAM■ Real-time, multi-tasking OsX operatingsystem on-board■ Option for st<strong>and</strong>-alone operation■ 10 timers■ Real-time clock <strong>and</strong> date■ Drivers for all commonly used PC operatingsystems (DOS, Win 3.x, Win 95 <strong>and</strong>98, Win NT)3


<strong>PROFIBUS</strong>Modules <strong>and</strong> ConfigurationThe M-DPM-12 <strong>PROFIBUS</strong> master■ Intelligent <strong>PROFIBUS</strong>-DP master with12 MBaud■ Conforms to the international EN 50170st<strong>and</strong>ard■ CPU (C165) <strong>and</strong> ASPC2 <strong>PROFIBUS</strong> controller■ Baudrates from 9.6 kBaud to 12 MBaudRS-485 <strong>PROFIBUS</strong> interface, electricallyisolated, pluggable with a C-Link■ 16-kB dual-ported RAM interfaceThe M-DPS-12 <strong>PROFIBUS</strong> slave■ 2 independent <strong>PROFIBUS</strong>-DP slaveswith a Siemens SPC3 controller■ Dual-ported-RAM user interface■ Conforms to the international EN 50170st<strong>and</strong>ard■ Automatic baudrate detection up to 12MBaud■ One <strong>PROFIBUS</strong> interface per channel,RS-485, electrically isolated, pluggablewith a C-LinkIntelligence synergized with highperformanceThe intelligent <strong>PROFIBUS</strong>-DP master moduleM-DPM-12 for MODULAR-4/486 carrierboards supports baudrates of up to 12MBaud. It processes the <strong>PROFIBUS</strong>-DPprotocol in complete independence of thecarrier board, thus freeing the CPU on theMODULAR-4/486 board from all protocolrelatedtasks. The physical interface to the<strong>PROFIBUS</strong> (st<strong>and</strong>ard: RS-485, electricallyisolated) is established by means of a micromodule,also referred to as a C-Link. C-Linksare used on other communication modulesfor the MODULAR-4/486 board as well. Themodule incorporates a C165 micro-controller,an ASPC2 <strong>PROFIBUS</strong> controller, plusRAM, ROM <strong>and</strong> a FLASH memory for storingthe system configuration. The interfaceprovided for the user is a dual-ported RAM,over which all data <strong>and</strong> comm<strong>and</strong>s can beexchanged.4Multi-purpose allrounderThe M-DPS-12 module converts a MODU-LAR-4/486 into one or two multi-purpose<strong>PROFIBUS</strong>-DP slave stations. The physicalinterface to the <strong>PROFIBUS</strong> is plugged on bymeans of one C-Link for each channel. Themodule automatically detects the baudrateon the <strong>PROFIBUS</strong>, which can be between9.6 kBaud <strong>and</strong> 12 MBaud. User <strong>and</strong> diagnosticdata are transferred to the carrierboard in the dual-ported RAM. The modulelibrary included in the scope of delivery supportsthe user in implementing a slave.With this module, appropriate programmingof the carrier board <strong>and</strong> the use of furthermodules define the function which a particularslave is to perform. The number of user<strong>and</strong> diagnostic data to be transmitted isspecified by the user. For example, a multifunctionslave with digital <strong>and</strong> analog inputs<strong>and</strong> outputs is one possible option. The realtimesoftware on the MODULAR-4/486board will then ensure that the user data aretransferred from the slave to the outputmodules, <strong>and</strong> that the data acquired aretransferred from the input modules to theslave.P-DPM-12 PC/104 boardThe “small” MODULAR-4/486 board


Further applications for the<strong>PROFIBUS</strong> modulesFor example, two independent <strong>PROFIBUS</strong>systems can also be linked via an M-DPS-12module. In this case, the MODULAR-4/486board h<strong>and</strong>les data interchange betweenthe two <strong>PROFIBUS</strong> lines.An additional <strong>CAN</strong> module makes theMODULAR-4/486 into a router betweentwo different networks.The MODULAR-4/486 board can be used toconnect PCs with master <strong>and</strong> slave modules,to form a computer link with a hightransmission rate (12 MBaud).The limits to the options available to you ineach case lie only in the number of existingPC slots <strong>and</strong> the module slots on theMODULAR-4/486 board respectively.SlavesConfiguring the <strong>PROFIBUS</strong> systemSoftwareThe <strong>PROFIBUS</strong> system is planned for maximizedoperator-friendliness, using a graphicaluser interface. With the COMET200Windows software from Siemens, creation<strong>and</strong> documentation of the system are child’splay. All you have to do is select the otherslaves (e.g. SORCUS M-DPS-12, SiemensET-200, etc.), “append” these to the master,<strong>and</strong> assign the station numbers. After that,you can parameterize <strong>and</strong> configure theslaves, <strong>and</strong> also set the parameters for thebus itself. The maximum settable baudrateis specified by the slowest slave.For system documentation, the configurationcreated with COMET200 can beprinted out or exported as a text file. Finally,COMET200 will generate a file fordownloading onto the M-DPM-12 mastermodule, where it is permanently stored inMasterAutomaticsystem documentationthe FLASH memory. You have thus completedconfiguration of your system. Assoon as the system is started, the masterwill cyclically address the slaves, <strong>and</strong> theuser data can be exchanged over the dualportedRAM of the master module on theMODULAR-4/486 board. This contains anupdated image of the process peripherals(user data).The module’s scope of delivery includes ahigh-level-language library suitable both forPC programs <strong>and</strong> for real-time programs onthe MODULAR-4/486 board. The library providesall functions required for operating the<strong>PROFIBUS</strong> system: in addition to read/writefunctions, these include various diagnosticfunctions as well.Slave list:Selecting<strong>and</strong> addinga subscriberby “drag<strong>and</strong>-drop”5


<strong>CAN</strong>-BusHardware <strong>and</strong> Programming<strong>CAN</strong> Software <strong>and</strong> ProgrammingM-<strong>CAN</strong>-1 <strong>and</strong> S-Link SL-<strong>CAN</strong>i■ 1-MBit/s <strong>CAN</strong> module with full <strong>CAN</strong>functionality■ Supports <strong>CAN</strong> specifications 2.0A <strong>and</strong>2.0B (11-bit <strong>and</strong> 29-bit identifiers)■ Electrically isolated from the <strong>CAN</strong> bus■ Intel i82527 controller■ Bus terminating resistor can be switchedin using the software<strong>CAN</strong> HardwareThe M-<strong>CAN</strong>-1 module <strong>and</strong> the SL-<strong>CAN</strong>i S-Link turn any MODULAR-4/486 resp. Multi-COM board into an active <strong>CAN</strong> node.Module <strong>and</strong> S-Link support the <strong>CAN</strong> specifications2.0A <strong>and</strong> 2.0B. <strong>CAN</strong> messages canbe transmitted <strong>and</strong> received in the st<strong>and</strong>ard<strong>CAN</strong> format with 11-bit <strong>and</strong> (in extended format)with 29-bit identifiers. The 82527 onboardcontroller from Intel looks after messageformatting, error detection <strong>and</strong> h<strong>and</strong>ling,<strong>and</strong> largely frees the basic board fromprotocol h<strong>and</strong>ling. An electrically isolated interfaceto the <strong>CAN</strong> bus in conformity withISO/DIS 11898 has been implemented withthe 82C250 <strong>CAN</strong> transceiver from Philips.Configuration data are stored in themodule’s or S-Link’s own EEPROM. Themodule is linked to the <strong>CAN</strong> bus over the 9-pole D-Sub plug connector (CiA St<strong>and</strong>ard102) integrated at the module. A busterminating resistor can be switched inusing the software.A library is at the user’s disposal, containing <strong>CAN</strong> bus. The system can thus react individuallyto every single message object.all the requisite functions for controlling themodule <strong>and</strong> the S-Link. This library can beOne typical application for the module is diagnosisof an existing <strong>CAN</strong> network. In thisused both in PC programs (e.g. under DOSor Windows) <strong>and</strong> in real-time programs onway, you can listen in to all telegrams (messages)<strong>and</strong> log them, for instance (monitorthe MODULAR-4/486 resp. the Multi-COMboards. Note that the library utilizes themode).driver program supplied, which must be installedon the board as an interrupt task. In conjunction with the other modules availablefor the MODULAR-4 system, the <strong>CAN</strong>This driver program h<strong>and</strong>les the entiremodule administration tasks.bus module can be used to implement ahost of other systems above <strong>and</strong> beyondAll the message objects required (comprisingidentifier <strong>and</strong> user data) must be config-st<strong>and</strong>ard solution packages. In this context,the MODULAR-4/486 board can be exp<strong>and</strong>edto become a multi-function commuuredduring application initialization. In thisprocess, each message object is assignednication <strong>and</strong> data-acquisition system. Sincean unambiguous ID <strong>and</strong> some other characteristics.the MODULAR-4/486 board can h<strong>and</strong>le theentire control functions for a system in realIn addition, a user-defined service routine time, the PC is thus freed from these tasks,must be specified for each message object; <strong>and</strong> can be used for visualization <strong>and</strong> datathis routine is called automatically whenever processing purposes.data for this message object have been receivedor successfully transmitted over theLibrary Functions• m049_bib_startupInitialize module library• m049_config_moduleConfigure module• m049_config_msg_object Configure new message object• m049_set_acceptance_mask Configure module as a <strong>CAN</strong> bus monitor• m049_start_comStart <strong>CAN</strong> bus communication• m049_stop_comFinish <strong>CAN</strong> bus communication• m049_set_dataSet user data of a message object• m049_get_dataRead user data of a message object• m049_get_idRead identifier value of a message object• m049_send_dataSend data of a message object• m049_send_data_request Send data request for a message object• m049_clear_msgDeactivate an active message object• m049_evaluate_srqEvaluate service request of driver program• m049_get_diagnosisRead diagnostic message of driver program• m049_set_doutSet a digital output of the <strong>CAN</strong> interface6


ProgrammingHigh-level-language libraries <strong>and</strong>real-time programmingHigh-level-language librariesThese libraries offer the operator a userfriendlyinterface for communicating fromthe PC with the MODULAR-4/486 <strong>and</strong>Multi-COM boards <strong>and</strong> are available for avariety of programming languages, like C,Pascal <strong>and</strong> BASIC, <strong>and</strong> for differentoperating systems, such as MS-DOS,Windows 3.x, Windows 95, 98 <strong>and</strong> WindowsNT. You can serve up to eight boards fromone library.Since the boards constitute an autonomouscomputer system with its own integratedprocessor, communication with the PC entailssome elaborate routines. This communicationis h<strong>and</strong>led entirely by the library,meaning that users need not bother themselveswith the details involved, e.g.■ configuring the board■ loading real-time programs onto theboard■ exchanging data between board <strong>and</strong> PC■ error h<strong>and</strong>lingPortabilityThe functionality of the libraries is the samefor the various PC operating systems, whichmeans that a particular application program(once it has been developed) can easily beported onto a different operating system.Real-time programmingAll SORCUS boards possess their own microprocessorrunning the OsX multi-taskingoperating system, which provides real-timecapabilities. This enables genuine parallelprocessing with the PC to be implemented,which is more or less essential if data are tobe acquired <strong>and</strong> processed in real time,especially when modern-day PC operatingsystems like Windows NT or similar arebeing used. Data-acquisition <strong>and</strong>communication tasks can thus be run on theboard in complete independence of the PC,thus freeing your PC to h<strong>and</strong>le other tasks,like visualization <strong>and</strong> data storage.Operating systems <strong>and</strong> programminglanguages supportedIf the compiler you’re using is not mentionedhere, please contact SORCUS.MS-DOS• Borl<strong>and</strong> C (as from Version 3.1)• Microsoft C (as from Version 8.0)• Watcom C (as from Version 10.0)• Borl<strong>and</strong> Pascal (as from Version 6.0);also Protected ModeWindows 3.11• Borl<strong>and</strong> C (as from Version 3.1)• Borl<strong>and</strong> Pascal (Version 7.0)• Borl<strong>and</strong> Delphi (as from Version 1.0)• Microsoft Visual Basic (as from Vers. 3.0)• Microsoft Visual C (as from Version 1.0)• Watcom C++ (as from Version 10.0)• DASYLabWindows 95, 98 <strong>and</strong> NT• Microsoft Visual C++ (as from Vers. 4.0)• Borl<strong>and</strong> C++ (as from Version 5.0)• Borl<strong>and</strong> Delphi (as from Version 2.0)• Microsoft Visual Basic (as from Vers. 4.0)• DASYLabUnder preparation:LabView drivers (1Q99)Real-time programs, i.e. those programsrunning as tasks on the board, are very easyto program for you as the user, since youcan access Borl<strong>and</strong>’s <strong>and</strong> Microsoft’s st<strong>and</strong>ardPC compilers (Pascal or C++) duringprogramming. A specific development environmentis not necessary.To develop your own real-time programs,you have to proceed in three steps:1. Enter <strong>and</strong> compile the real-time programconcerned under Borl<strong>and</strong> Pascal,Borl<strong>and</strong> C++ or Microsoft C++.2. Transfer the program onto the MODU-LAR-4/486 or Multi-COM board.The completely compiled real-time programcan be transferred onto the board eitherwith the PC utility programs supplied orfrom one of the user programs by means ofthe PC libraries provided.3. Test <strong>and</strong> debug the real-time programYou can use the Turbo-Debugger fromBorl<strong>and</strong> for this purpose, for example. Thisenables a real-time program to be debuggedjust like a PC program, at the source level.All the Turbo-Debugger’s features, such asbreakpoints, watch variables, etc. are ofcourse available for this purpose.A real-time program’s structure resemblesthat of a DOS program, except that the programcode has been subdivided into whatare called task procedures. These can subsequentlybe called from other tasks on theboard or from the PC as well, e.g. to start orabort a data acquisition routine. In additionto the task procedures, the program alsocomprises a parameter area <strong>and</strong> a data area.The parameter area will normally containconfiguration <strong>and</strong> parameterizing data definableby the user later on, like scan rate, numberof measuring channels, etc. The dataarea can be used to accommodate the measureddata obtained.As with the task procedures, here too, othertasks on the board <strong>and</strong> the PC itself can veryeasily access parameters <strong>and</strong> data. Moreover,complete libraries are provided for addressingthe various I/O functional units <strong>and</strong>the operating system’s routines.7


OverviewCommunication boards <strong>and</strong> modulesMODULAR-4/486 PC boards <strong>and</strong> ModulesThe ”large“MODULAR-4/486Intelligent multi-function board with 4 slots (exp<strong>and</strong>able to 9) for communication<strong>and</strong> I/O modules, 6 timers, real-time clock, watchdog, 2 RS-232 interfaces,multi-tasking operating system with real-time capabilities on-board<strong>PROFIBUS</strong><strong>CAN</strong>Serial communicationThe ”small“MODULAR-4/486Intelligent multi-function board with 2 slots for communication <strong>and</strong> I/O modules,6 timers, real-time clock, watchdog, 2 RS-232 interfaces, multi-taskingoperating system with real-time capabilities on-board, up to 34 MByte RAM<strong>PROFIBUS</strong><strong>CAN</strong>Serial communicationM-DPM-12M-DPS-12M-<strong>CAN</strong>-1M-ETH-1M-COM-2<strong>PROFIBUS</strong>-DP master with its own intelligence, up to 12 MBaud<strong>PROFIBUS</strong>-DP slave, 2 channels, up to 12 MBaud<strong>CAN</strong> bus module, specification 2.0A <strong>and</strong> 2.0BEthernet module with 10 base-T (twisted pair) <strong>and</strong> AUI interfaceSerial communication module, 2 channels, configurable with C-Link for:RS-232, RS-422, RS-485, 20 mA, optical-fiber link<strong>PROFIBUS</strong><strong>PROFIBUS</strong><strong>CAN</strong>CommunicationSerial CommunicationM-COM-8M-IEC-1Multi-COM PC board <strong>and</strong> S-LinksMulti-COMSerial communication module, 8 channels, RS-232IEC bus module, device or system controllerIntelligent communication board with 6 serial interfaces: 5 configurable withS-Links: RS-232, RS-422, RS-485, RS-232 iso., RS-422 iso., RS-485 iso., 20mA, <strong>CAN</strong> iso., 2 x SSI, 10 timers, real-time clock, watchdog, multi-taskingoperating system with real-time capabilities on-board, up to 34 MByte RAMSerial CommunicationCommunication<strong>CAN</strong>Serial CommunicationSL-<strong>CAN</strong>iPC/104 boardsMODULAR-104/486P-DPM-12<strong>CAN</strong> bus S-Link, specification 2.0A <strong>and</strong> 2.0BComplete PC on a PC/104 module with 486 or 586 CPU up to 133 MHz,including interface for floppies <strong>and</strong> EIDE, 2 x serial, 1 x parallel, VGA (CRT<strong>and</strong> LCD), mouse port, etc.<strong>PROFIBUS</strong>-DP master with its own intelligence, up to 12 MBaud<strong>CAN</strong>PC/104<strong>PROFIBUS</strong>PC/104Further modules for the MODULAR-4/486:Analog I/O with 12 <strong>and</strong> 16 bits resolution, digital I/O, counter, incremental encoder, SSI interface, etc.SORCUS Computer GmbHIm Breitspiel 11, D-69126 HeidelbergPhone ++49 (0) 62 21-32 06-0, Telefax ++49 (0) 62 21-32 06-66Internet: www.sorcus.com8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!