setting up the red lion crimson software for modbus...
TRANSCRIPT
3600-4170_00 • 1 •
Technical Note
Setting up the Red Lion® Crimson Software for Modbus TCP Communication to Tolomatic's ACS Drive
Contents1 SystemRequirements.............................................................................................. 2
2 Cabling................................................................................................................... 2
3 SettingupTolomaticACSDrive................................................................................ 2
4 SetupRedlionHMI................................................................................................... 3
5.1 Communication.......................................................................................... 4
5.2 DataTags.................................................................................................. 5
5.3 DisplayPages............................................................................................ 6
5.4 DownloadtoHMI........................................................................................ 8
5 ProgrammingHMI................................................................................................... 8
5.1 EnteringaMotionProfile............................................................................. 8
5.2 PerformanAbsoluteMove.......................................................................... 8
5.3 ButtonAction............................................................................................. 9
5.4 PageNavigation....................................................................................... 10
6 ComplexPrograms................................................................................................ 11
6.1 IncrementalMoves................................................................................... 11
6.2 IndexMoves............................................................................................. 12
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 2 •
Technical Note
1 System RequirementsRed Lion HMI HARDWARE MINIMUM REQUIREMENTS
Processor Refer to OS Requirements
Software Requirements Windows XP with Service Pack 2 (or above)
RAM Refer to OS RAM requirements
Disk Space 150MB needed for intallation plus an OS disk requirements
Tolomatic'sACSDriveusedtheTolomaticMotionInterface(TMI)softwarewhichisdependanton.NET4.PleasereferencetheTMIUserGuide3600-4164forminimumrequirements.
2 CablingConnecttheHMIpowerconnectortoanappropriatepowersupply.Next,connecttheHMItoyourcomputerthoughaUSBcable.Lastly,connecttheHMItotheACSdriveusinganEthernetcableandtheEthernetports.
3 Setting Up the Tolomatic ACS Drive IP AddressRunTolomaticMotionInterfaceandconnecttotheACSdrive.ChoosetheTools->EthernetmenuselectionorpresstheConfigureEthernetbuttoninthetoolstrip.
Figure 1: Network Settings
EntertheIPaddress,SubnetMaskandDefaultGatewayparametersforyournetwork.(ThevaluesshownabovearethefactorydefaultvaluesfortheACSdrive.TypicallyatleasttheIPaddressandDefaultGatewaywillneedtobechangedforyournetwork.)
ConfigureACSdriveforthedesiredActuatorandMotor.
ConfigureACSdriveforModbusTCPcontrol.
ConfigureACSdrivewithdesired16-positionindexmoves.
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 3 •
Technical Note
Figure 2: Select Modbus TCP in the Mode Select Tab
4 Setting Up the Red Lion HMI Using Crimson SoftwareDownloadandinstallCrimson3.0fromtheRedLiondownloadwebsite:
http://www.redlion.net/Support/Downloads/SoftwareLibrary/Crimson3.html
OpenCrimson3.0software.Select‘File’->‘New’tocreateanewdatabaseproject.SelectthemodeloftheHMI.InthisexampleaG306isused.Click‘OK’.
Figure 3: Setting Up the Crimson Software
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 4 •
Technical Note
4.1 CommunicationNext,select‘Protocol1’intheNavigationPane.Clickon‘Pick’underDriverSelection.Alistofallcommunicationoptionsappears.Select‘Modbus’and‘TCP/IPMaster’thenclick‘OK’.
Figure 4: Driver Selection
ThescreenshouldnowlooklikeFigure5.
Figure 5: Navigation and Communications Screen After Driver Selection
Select‘PLC1’intheNavigationPaneandchangethenameofthedrive.ThisdriveisnamedTolomatic_ACS_Drive.
SelectthedriveandentercommunicationinformationincludingtheIPaddressoftheACSDrive.
Figure 6: Changing the Drive Name
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 5 •
Technical Note
4.2 Data TagsCreatedatatagswithaddressesthatcorrespondtotheACSdrive’sModbusRegisterAddresses.
TheModbusRegisterAddressesaresummarizedinthefollowingtable.Paycloseattentiontochangesinsettings,andaddthemalltoDataTags.Thetagsusedinthistutorialareidentifiedbyboldfont.
TAg NAME ADDRESS MANIPULATIoN TREAT ASREAD oNLy
Current_Position 304001.REAL Reverse Words Floating PointDrive_Status 304003.LONG Reverse Words Signed Integer
Drive_Faults 304005.LONG Reverse Words Signed IntegerDigital_Inputs 304007.LONG Reverse Words Signed IntegerDigital_Outputs 304009.LONG Reverse Words Signed IntegerAnalog_Input 304011.REAL Reverse Words Floating PointAnalog_Output 304013.REAL Reverse Words Floating Point
READ/WRITEControl_Byte 414001.WORD None Unsigned IntegerMove_Select 414002.WORD None Unsigned IntegerTarget_Postion 414003.REAL Reverse Words Floating PointTarget_Velocity 414005.REAL Reverse Words Floating PointTarget_Accel 414007.REAL Reverse Words Floating PointTarget_Deccel 414009.REAL Reverse Words Floating PointTarget_Force 414011.REAL Reverse Words Floating PointTarget_Motion_Type 414014.WORD None Unsigned IntegerDigital_Output 414016.WORD None Unsigned Integer
NOTE: Refer to the Tolomatic Mobdus TCP Programmer's Guide 3600-4169 for information on faults and status bits.
Afterallofthetagsareentered,thenames,colors,andsymbolsshouldlooklikeFigure7.
Figure 7: Data Tags
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 6 •
Technical Note
4.3 Display PagesThetagsarenowreadytobeusedinthedisplaypages.First,selectthe‘DisplayPages’tabontheNavigationPane.Clicktheiconintheupperlefttoaddanewpage.AnimageoftheRedLionHMIscreenshouldappear.Rightclickthisnewpageandselect‘Rename’togiveitausefulname.Nowselect‘DataTags’onthe‘ResourcePane’.YourscreenshouldlooklikeFigure8.
Figure 8: Using Data Tags in the Display Pages
Placeatagtoshowthecurrentpositionvalue.Todothis,eitherdouble-clickonthetagintheResourcePanetoplaceitorclickonthetaganddragitontothepage.Click-and-holdonthetagtomoveitaroundthescreen.
Figure 9: Placing a Data Tag
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 7 •
Technical Note
Doubleclickonthetagtoaccessitsproperties.Nothingneedstobechangedinthepropertiesforthistag.
Addadditionaltagsasnecessarytocommandthedrivetomakeanabsolutemove.ThetagsneededtosetupamotionprofileareshowninFigure10.Stretchthemouthorizontallysotheyarealigned.
Figure 10: Setting up a Motion Profile
Fortheremainingtags,double-clickthetagtoseeitsproperties.Under‘FieldType’->‘Operation’select‘DataEntry’.
Figure 11: Editing Data Tag Values
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 8 •
Technical Note
4.4 Download to HMIBesuretosaveyourprojectfirst,andthendownloadtheprojecttotheHMI.Gotomenuitem‘Link’->‘Update’orclickthe icononthetoolbar.Iftheprogramdownloadscorrectlytherewillbenopop-upmessagesandthepagecreatedshouldshowontheHMIscreen.
5 Programming the HMIToperformamoveontheACSdrive,amotionprofilemustbeassignedusingdatatags,andabuttonmustbeaddedtothedisplaytocallanactionuponbeingpressed.
5.1 Entering a motion profilePower-ontheTolomaticACSDriveandverifyitisconnectedtotheHMIwiththeEthernetcable.Whencommunicationbegins,thetagvaluesshouldchangefrom‘---‘tosomenumber.NowvaluesforamotionprofilecanbeenteredbytouchingthetagontheHMIscreen.Apopupkeypadshouldappearforenteringnumbers.
5.2 Perform an Absolute MoveEnteramotionprofilesimilartotheoneinthefollowingtable.Theparametersshouldbekeptlessthanthemaximumratingsoftheactuator.
DATA TAg VALUE (UNITS) MAx ALLoWABLE (UNITS)
Move_Select 0 (for immediate move) 16 (0 for immediate move, 1-16 for index)
Target_Position 30.0 (mm) Maximum stroke length
Target_Velocity 15.0 (mm/sec) Refer to actuator documentation
Target_Accell 100.0 (mm/sec/sec) Refer to actuator documentation
Target_Decel 100.0 (mm/sec/sec) Refer to actuator documentation
Target_Force 100.0 (%) 10-100%
Target_Motion_Type 0 (for absolute move) 0 (for absolute), 1 (for incremental forward), 2 (for incremental reverse)
The‘Control_Byte’datatagmustbemanipulatedtoinstructthedrivetoexecutemoves.First,theactuatormustfinditshomeposition.TheControlBytetagmustbesetto‘5’.Thissetsthedriveenablebitandthehomebit.Thedriveshouldimmediatelyhomewhena‘5’isentered.
Anabsolutemoveismadebywriting‘3’totheControlByte.Theactuatorwillmovetothevaluein‘Target_Position’.NomotionwilloccuriftheTargetPositionvaluehasnotchangedsincethelastmove.Writinga‘1’totheControlByteclearstheStartMotionbitandkeepstheenablebitset.Writinga‘3’setsthestartmotionbit.Formotiontooccur,theStartMotionbitmusttransitionfromlowtohighwhilethedriveisstillenabled.
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 9 •
Technical Note
5.3 Button ActionNext,an'Enable'buttonwillbecreatedtoenablethedrivewhenitispressed.
StartbycreatinganotherpagebyselectingDisplayPagestabontheNavigationPaneandclickingthenewpageicon.
Somebuttonoptionsareunder‘Primitives’ontheResourcePane.Selecttheshapetoadd,anddragitontothepage.Figure12showsagreenbevelbutton.
Figure 12: Adding Buttons
Toaddtext,selecttheshapeandselect‘Text’->‘add’fromthemenu.Modifythecolorandsizeforthebutton’spurpose.Tomodifythetextcolorandsize,selectthebuttonandgoto‘Text’inthemenuand‘Properties’.Thisbutton’stextwaschangedtoblack.
Figure 13: Modifying Buttons
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 10 •
Technical Note
Tomakethisbuttonperformanactionwhenitispressed,clickonthe‘Action’tabinthebuttonpropertieswindow.IfthereisnoActiontab,thenitcanbeaddedbyhighlightingthebuttonandselect‘Behavior’->‘AddAction’fromthemenu.Underthe‘Action’taband‘ActionMode’->‘Operation’,select‘UserDefined’.Nowwriteasimpleexpressioninthetextboxnextto‘OnPressed’.Writinga‘1’totheControl_Bytetagsetstheenablebitandclearstheothercontrols.
Figure 14: Creating Button Actions
5.4 Page NavigationOncemultiplepagesarecreated,createthenavigationtothebuttonspages.Onthedisplaypage,therethe4buttonsontheleft-handsideofthescreen.Thereisalsoafifth‘Menu’button.Doubleclickonthetopbutton(SoftKey1).Intheproperties,select‘GotoPage’fortheoperation.Select‘Buttons’forthetargetpagetonavigatetotheButtonsdisplaypage.Doubleclickthetopbutton,andrepeattheabovestepsselecting‘AbsoluteMove’asthetargetpage.TheSoftKeybutton’sfunctionmustbespecifiedforeachdisplaypage.
Figure 15: Creating Button Navigation
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 11 •
Technical Note
Click‘OK’,savetheprogram,anddownloadtotheHMI.TheEnablebuttonsshouldbefunctional.
Tryaddingmorebuttonsinthesamemanner.Add‘Disable’,‘Home’,and‘E-Stop’buttons.Theexpressionsforeachbuttonareasfollows:
BUTToN ExPRESSIoN
Enable Control_Byte = 1
Disable Control_Byte = 0
Home Control_Byte = 5
E-Stop Control_Byte = 9
Hereisanexampleofaddingotherbuttons.
Figure 16: Button Examples
6 Complex ProgramsTheRedLionHMIhasprogrammingability.Thesenexttwoexampleswillshowhowtoperformmoreadvancedmoves.
6.1 Incremental MovesAddtwomorebuttonstotheAbsoluteMovespageforpositiveandnegativeincrementalmoves.Placealabeltoidentifytheactiontobeperformed.
Figure 17: Adding Positive and Negative Incremental Move Buttons
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 12 •
Technical Note
Inbuttonproperties,selecta‘UserDefined’operationandselect‘Complex'under‘OnPressed’.Awindowwillpopuptoeditcomplexactions.Thisistheplacetowriteseveralexpressions(programcode).Themotiontypeissetto‘1’forpositiveincrementalmovesfortherightarrowbutton.Click‘OK’whenthecodeinthefollowingfigureisenteredcorrectly.
Figure 18: Edting Complex Actions
Addthesamecomplexactiontotheleftarrowbutton,butmakethemotiontype‘2’fornegativeincrementalmoves.DownloadtheprogramtotheHMIandverifyitisworking.Besuretohavenon-zerovaluesfortheTarget_Postion,Velocity,Accel,Decel,andForcedatetags.
6.2 Index MovesItmaybeusefultoprogramtheHMItostepthroughall16oftheindexmoves.Setupthe16moveprofilesusingTMIandsavethemtoflashmemory.
Makea‘Start’button.Addtextdescribingitsfunction.
Figure 19: Index Move Step Through Setup
IntheNavigationPane,selectthe‘Programs’tab.Selecttheiconintheupperleftforanewprogram.Renameitto‘Cycle_Index_Moves’.Addthecodeshowninthenextfigure.Whenthecodeisentered,clickthe‘Translate’ icononthetoolbar.Correctanysyntaxerrors.
3600-4170_00•SettingUpRedLion®CrimsonSoftwareforModbusTCPCommunicationwithTolomatic'sACSDrive
• 13 •
Technical Note
Figure 20 : Creating a Program to Cycle Index Moves
Thisprogramloopsthrougheachofthe16indexmoves(1-16).Thecounterisanintegercalled‘index’.The‘Move_Select’tagtellsthedrivewhichmovetomake.Next,toggletheStartMotionbittostartthemove.Insertashortdelaysothatthemoveisstartedbeforethenextinstructionexecutes.Inserta‘while’loopthatwillwaituntilmotioniscompletebeforeexecutingthenextmove.Motioncompleteisindicatedbybit2ofthe‘Drive_Status’tag.Theprogramwillexitwhenindex16iscompleted.
Clickonpropertiesontheprogramstab.Settheexecutiontaskto‘Background1’.ThiswillpreventtheHMIfromthinkingitisstuckinaloopandresettingpower.Italsohelpstoupdatetagsdisplayedonthescreen.
Nowthattheprogramiswritten,itcanbeaddedtothebuttonaction.Addthenameoftheprogramendingwithopenandclosedbraces:Cycle_Index_Moves().
Figure 21: Adding a Program to the Button Action¸
Click‘OK’,saveproject,andthenclick‘Update’icontodownloadtotheHMI.Thenewbuttonshouldexecutetheprogramwhenpressed.