Home
ScadaMobile 2_4_0
Contents
1. e Added Siemens ISO_TCP in the list of supported protocols and references to it where relelvant e Updated description of the value tag attribute in Tag Attributes section e Added sub section Global Attributes for Siemens S7 Controllers under Global Attributes heading e Updated sub section Multiple range lookup tables under Look up Tables heading e Changes in section Data types in Expressions e Updated section Performance e Removed Example PagesExampleEIP csv e Added Example CommunicationsState csv pag 99 101 www sweetwilliamsl com sweetwilliam ScadaMobile Added Example International ONE txt e Added screen shots for Example Aphorism ONE csv Version 2 0 0 e New styled table of contents Added section Tag Scope e Added memory arrays definition in section Specification of Variable Types e Mention of how to specify communication protocol in section Specification of Variable Addreses e Incorporated references to the new strings type in section Specification of Variable Addreses e Added reference for accessing program tags in Logix controllers in section Specification of Variable Addreses e Added section Internal Tags e Replaced all previous references to Local tags by Internal tags e Replaced all previous references to arrays by value lists and text strings by text
2. Secci n1 CF114 P 2 label Failed comment Pump 2 Fail state access 3 IMP 2 label Man Auto comment Manual Run will stop process accesg VELOPER label Output Flow L s comment Output Flow for simulation VELOPER label Input Flow 1 L s comment Input Flow 1 for simulation ELOPER label Input Flow 2 L s comment Input Flow 2 for simulation Seccidn3 Secci n4 3 If you want to perform a bulk export of all symbols used in a par S ovowaons x Pump_1_mode eno Sgt ScadaMobileExample 01 ticular program section you can simply export the whole section Barer 8 Open as a Reusable program file ScadaMobile will be also able to E Fenton Sis E open enon Goto Rung Step recognize any symbols in this file can e liiis Function Block ladder generation Reusable Fie O H File Move Down Rename v Allow Docking Hide Float In Main Window Properties Files with cxr extension created in this way will be recognized as Sources by ScadaMobile pag 65 101 Valve_1_mode Add to Project sven www sweetwilliamsl com sweetwilliam ScadaMobile 3 3 Rockwell RS Logix 5000 as a data source generator Allen Bradley support in ScadaMobile includes the possibility to accept files generated directly from Rockwell Software RS Logix development environment as Data
3. Mitsubishi Modbus TCP Not Available See note below Modbus over TCP Opto22 Native SMValidationTag Integer32 Numeric variable that must be configured in the PAC Control strategy in order to allow ScadaMobile to communicate with it The valid range for its value is 0 65535 OxFFFF Set initially to 0 to avoid having to enter it on ScadaMobile during development stages Siemens SO_TCP MW998 Any value from 0000 hex to FFFF hex is valid The Validation Code feature is not available for Modbus TCP due to the great number of Industrial devices supporting this protocol which makes impractical to establish a general way to implement such feature Validation codes are entered in the relevant fields of ScadaMobile Connections View ScadaMobile will store and remember codes between connections but it will reset them to 0 for connections that changed as a result of source selection changes pag 82 101 www sweetwilliamsl com sweetwilliam ScadaMobile aull movistar 17 24 Connections Monitor C f Connections started 1 linked 1 failed 0 Connections Default Ethernet IP PCCC AlarmsEIP_PCCC csv gt Rate m 1 93 cps 1 0 S 0 96 rps Validation Code onan E Connected to 192 168 1 38 44818 n Connections Note that ScadaMobile will always perform this security check There is no way to disable or prevent it however you can set a custom validation tag Custom Val
4. Ruby and ScadaMobile is treatment of boolean values Ruby treats everything as objects including numbers while ScadaMobile keeps the traditional C like behavior For example in Ruby any number used in a boolean expression is a true value even if it holds zero ScadaMobile on the other hand will still interpret O zero as false and non zero as true in the traditional sense of earlier programming languages and hopefully in accordance to what PLC programmers would expect or feel more comfortable with NOTE If you are not familiarized with Ruby and want to test some ScadaMobile expressions before you start using them in your project you can try them on any of the available Ruby interpreters to help you understand how they work e On any Mac OS X or Linux computer open the Terminal and type irb This will launch the interactive Ruby interpreter On the gt gt prompt type or paste any expression you would like to try e Ruby can be installed on Windows as well Refer to this to begin with http Avww ruby lang org en downloads e You can even type Ruby expressions right on your Internet Browser Go here http TryRuby org Just type or paste the expression examples in this manual on any of the mentioned tools and see whether they give the expected results pag 47 101 www sweetwilliamsl com sweetwilliam ScadaMobile Values used in expressions or assigned to tag attributes using expressions are represented in engineering units
5. SMAbsoLuteTime timeformatterC yyyy MM dd HH mm ss may return the string 2013 01 20 10 15 34 pag 49 101 www sweetwilliamsl com sweetwilliam ScadaMobile Strings Strings are arbitrary sequences of characters that are manipulated as a whole Strings can be read from or written to PLCs Several operations can be performed on strings such as concatenate split or substring extraction by using the appropriate op erators or methods String literals are represented enclosed in double quotes Strings are internally encoded in a compatible type usually UTF8 but several encodings are supported for reading writting to PLCs Examples This is a Literal string JuckpeTHble parynkn ELI OF 7 ARa Arrays Arrays are indexed collections of objects Each element in an array is associated with and referred to by an index Array indexing starts at 0 A negative index is assumed relative to the end of the array that is an index of 1 indicates the last element of the array 2 is the next to last element in the array and so on Arrays can hold any objects such as Numbers Strings or other Arrays Arrays can be read from or written to PLC or can be cre ated on demand in expressions by just enclosing their elements in square brackets Example element at index 0 123 4 L 33 temperature The above expression represents an array of three elements At index 0 we have a literal string element at index 0 At index 1 we have
6. sweetwilliam ScadaMobile User Manual Version 2 4 0 www sweetwilliamsl com A e sweetwilliam What is ScadaMobile ScadaMobile SacadaMobile is a native iPhone and iPod Touch application for real time monitoring of industrial PLC based systems and proc esses In can be applied to building automation industrial process control mini hydro power plants water plants and anywhere where reliable instant access to real time remote data is essential Main features V Local or remote access Any number of concurrent PLCs V Very fast independent of project size immediate connection and display V Boolean Integer and Floating Point values vV Advanced Strings and Arrays Support V Direct file import from Excel V Configurable Accounts and Access Levels vV Alarms Trend Graphs V Lookup Texts Expressions V Direct connection to PLCs and RTUs without servers V TCP IP based security How you can use ScadaMobile in 5 simple steps 1 Create an Excel spreadsheet with the specs and behaviors of the Vari ables to be controlled See Data Source Files 2 Export or Save into a CSV file 3 Import the file created in step 2 into ScadaMobile See Import 4 Set the PLC IP address in ScadaMobile if you did not so in step 1 See Network access Ol Monitor process variable states and values from anywhere pag 2 101 il movistar lt 4 cCAaAlar Weight Value Linked to several a
7. ScadaMobile do not have a notion of PLC raw values except for writing or reading values from PLCs This is important in order to understand why assigning a value to an INTERNAL tag may not give the same result than writing it to a PLC tag and reading it back Dif ferences are due to the implicit scaling descaling and type conversion performed on PLC tags See the value attribute descrip tion for a discussion on this subject When using expressions in your project you must know the following Tag names in expressions are case sensitive This means that a tag named int value will not be the same than a tag named Int value Logical or Comparison operators assume non zero values to be true and zero values to be false The result of a Logical or Comparison operator however is always a value of 0 or 1 Comparison operators are non associative This means that expressions such as value a lt b lt c are not valid You must use value a lt b amp amp b lt c instead Assignments in expressions are not supported except for assigning values to attributes Therefore expressions such as value condition amp amp int tag 3 will cause a syntax error on the second assignment operator Do not confuse the assignment operator with the the equality operator which is fully supported An expression is executed only when at least one of the referred variables or tags change The process is totally trans parent and integrators mig
8. under the Documents category in the files tab when the tag value associated with this row transitions to true Example type viewer url http www apple com will display Apple s web site when the tag value associated with this row transitions to true Example type viewer url http Awww myserver com myManual pdf will display the file myManual pdf at http www myserver com Example type viewer url format doc 03d pdf number will display a file from the Documents category with generic name docXXX pdf given XXX replaced by the value of the variable number Example type player url mySpeechSound mp3 will play the audio file mySpeechSound mps3 under the Documents category in the files tab when the tag value associated with this row transitions to true Example type player url iPod Library You And Me will play an asset named You And Me from the ScadaMobile playlist on the device s iPod Library when the tag value associated with this row transitions to true special Can contain one of the texts below which determine a particular behavior or meaning text for the related row Tags with this type are referred to as Alarm Tags and are not shown on the main table but on the Alarms Panel They can be combined with the bounds attribute See Alarms viewer Viewer tags will display a file or web site when their associated tag value transitions from false to true The particular fi
9. 3 Use of International Characters in PLC Strings 3 1 11 Expressions 3 1 0 1 3 1 11 2 3 1 11 3 3 1 11 4 3 1 11 5 3 1 11 6 3 1 1 1 7 Supported Operators and Operator precedence System Variables Functions Methods and more about Operators The format specifiers and the format function The if then else clause and the ternary conditional operator __ Putting it all together Advanced Expressions Examples Data types in Expressions 40 Al 42 43 43 44 AA 44 46 47 49 5I 52 54 60 6l 62 O ON O ScadaMobile www sweetwilliamsl com We csenitiamn 3 2 Omron s CX Programmer as a data source generator 3 2 1 Build a project in CX Programmer 3 2 2 Generate a Source File with variables from CX programmer 3 3 Rockwell RS Logix 5000 as a data source generator 3 3 1 Build a Project in RS Logix 5000 3 3 2 Export Controller Tags from RS Logix 5000 3 4 Opto22 PAC Control as a data source generator 3 4 1 Build a project using PAC Control 3 4 2 Export Controller Tags from PAC Control 3 4 3 Add the Validation Tag to your PAC Control strategy Obligatory 3 5 Editing source files in a text editor 4 File Import and File Management in ScadaMobile 4 1 Source Files supported by ScadaMobile 4 2 Document Files supported by ScadaMobile 4 3 Custom Company Logo 5 Connections and Connections Tab 6 User Accounts 7 Network Settings for local access 7 1 PLC Settings for local access 7 2 ScadaMob
10. 30 50 minutes 30 seconds the referred indexed expression would give an out of bounds error as it would attempt to access a non existing element the one before the first one Note also that in all cases we use negative indexing because we interpret that the last part is always meant to be the seconds the previous to the last one the minutes and so on The proposed expression can be optionally optimized by storing the split string in a temporary variable so that the splitting is only performed once If we apply this optimization the final solution would look as follows tspt STRING 3 INTERNAL value t split seconds DINT INTERNAL value 3600 tspt fetch 3 0 to_i 60 tspt fetch 2 0 to_i tspt fetch 1 0 to_i pag 62 101 www sweetwilliamsl com sweetwilliam ScadaMobile Creating a row that alternates between displaying the current time and an arbitrary value In this example we will create a row that shows a living digital clock showing the current time Every 5 seconds the time is alter nated with a temperature value given in a variable named temp In order to achieve this we enter the following expression in a row value SMPulsel s Time SMDate spLlitC 1 Temperature temp to_sC 3 1f C We use the ternary operator to switch between the time and the temperature depending on the SMPulse10 system pulse vari able For the clock we take SMDate and discard the date portion by splitting it out The
11. 346 558 Output Flow L s 15 4 Current Output Flow from Tank High Level Set Point L 500 Level at which pumps stop Mid Level Set Point L 350 Level at which pump 1 stops Low Level Set Point L 100 7 Level at which pumps start Limit Switch Valve 1 Completely Open iPod 21 28 a Tags INT HOLDING REGISTER HR00005 UINT UINTValue HR00005 UINT 12345 R aL VINE MIiVLUVING MACMISCI CN DINTValue_ReadOnly HR00006 DINT 987654321 DINTValue HR00006 DINT 987654321 Bi HL a UL IIN IVG oei eif e u UDINTValue_ReadOnly HR00008 UDINT 123456789 UDINTValue HR00008 UDINT 123456789 MEAL MVLYVING MOUIOCI EM REALValue_ReadOnly HR00010 REAL REALValue HR00010 REAL 3 14159 3 14159 iPod 22 32 z NA CN CRAAL Main Run Stop Switch Main Process Start Stop Tfi gt WALTER IAIA Tank Level L Water Tank Current Level Output Flow L s Current Output Flow from Tank 15 4 High Level Set Point L 500 Level at which pumps stop Mid Level Set Point L 350 Level at which pump 1 stops Low Level Set Point L 100 7 Level at which pumps start Y y ee Valve 1 Completely Open Limit Switch Valve 1 Completely Closed Man Auto OFF OFF Manual Open will stop process Ld The provided examples demonstrate several ways for displaying elements on the Home view list iPod 22 44
12. 80 Too high SIMULATED CONTROLS Temperature 15 4 C a Moisture 68 9 www sweetwilliamsl com sweetwilliam ScadaMobile OPTO22 Examples It is assumed that Opto22 users have programming experience of Opto22 hardware and software If you do not contact Opto22 or your local Opto22 representative for help with Opto22 related issues and training SweetWilliam does not provide specific support for Opto22 beyond the scope of configuration of the ScadaMobile product Opto22pac csv This example is based on the Opto22 s standard PAC Learning Center hardware and is designed to show ScadaMobile access ing the control strategy engine area of a PAC Controller Download the associated demo software project Opto22_iOS_Demo rar from our site http Awww sweetwilliamsl com opto22 and install it using the free software PAC Project Basic 9 2 or higher http www opto22 com site pr_details aspx cid 1 amp item PACPROJECTBAS It uses the opto22 native protocol driver to access control strategy variables and I O by tagname communicating through port 22001 To develop an interface in ScadaMobile using the native PAC protocol it is necessary to have access to the original control strategy in order to add the obligatory validation tag without which ScadaMobile will not connect mi_ vodafoneES 12 06 4 Convenience Store D E E E E E E o E ee ee Point_of_ D01 Mod00 Ch01 OFF Freezer_Door D02 Mod00 Ch02 CLOSED
13. Database option un tick the following selection boxes as they are object types not directly supported by ScadaMobile Pointer Variables Pointer Tables Communication Handles ePID Loops gf PAC Control Basic iOS Demo Control Date N File Edit Configure Chart Subroutine Compile Mode Tools View Window Help PT 2 oF X te a A EI BO OD AE Compile View E3 Compile al ld amp of iOS Demo Control z iOS Demo Control Control Engines C Subroutines Induded Charts E Variables ial Numeric Variables amp String Variables Enable External Auto Lighting Ctrl gt Pointer Variables Communication Handles C Numeric Tables Enable Viewer _cctv 5B String Tables Enable cctv video feed in Viewer Page of iOS Device am bindhi e ail function for es jiu g eames Indude Numeric Variables Numeric Tables String Variables String Tables INT RUN o E Pointer Variables F Pointer Tables a a i I O Units amp Points Communication Handles T PID Loops Enable Fuel Display Output INT RUN 0 INT RUN INT Descriptions FLOAT INT FLOAT INT If you move an I O point in PAC Control no change is required in ScadaMobile However if you change the name of a variable or I O point you will also need to modify the tag name in the corresponding ScadaMobile source files pag 67 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 4 3 Add the Validation Tag to your PAC Control s
14. Duplex Refresh Set Status Running Cancel Help For Modbus TCP based devices or Siemens S7 controllers refer to the vendor s documentation Now log into the GPRS or DSL Router and configure NAT options to set up a bridge between the WAN and your PLC local address and port Note that the default port number is 44818 for Ethetnet IP 502 for Modbus TCP and 9600 for Omron PLCs Protocol on the router must be set to TCP IP Look at your router documentation for details 6 If you have a fixed IP address enter it as such in ScadaMobile either as a Settings default or embedded in Source Files 7 lf your router access the WAN through a dynamic IP then you must create an account with a dynamic DNS services provider such as www dyndns org and configure your router to notify of IP changes In this case enter in ScadaMobile the name you chose for your dynamic DNS The port number must still be the one configured in the NAT section of your router pag 80 101 gull movistar 17 00 a ati ngs Remote Port 44819 E Siemens ISO_TCP defaults Remote Port 102 Default Connection Local 192 168 1 38 Remote mydns dyndns org Enable SSL OFF oine CEED gt rt TEN Settings www sweetwilliamsl com sweetwilliam ScadaMobile 9 Security ScadaMobile networking security is based on TCP IP technology and depends in part on the security features available in the router installed at the PLC location For lo
15. Kind for a discussion on these values For example style alarm bounds inf 100 will make the alarm to trigger only when the value on the tag is above 100 The default value for the bounds attribute on alarm tags is bounds 0 0 Therefore any non zero value in a tag will trigger an alarm This is specially relevant for BOOL tag alarms because by default they will become active when the tag goes to 1 true and inactive otherwise just as you would expect Example The following rows on a source file represent the settings for the alarm tags that generated first and forth rows on the screen shot in this page Alarmi INT HR1 label Group 1 comment Weight Value went above 6 kg style alarm bounds inf 6 Alarm4 BOOL C1 label Group 2 comment Someone Manipulated the Switch style alarm Performance Considerations Unless regular tags alarm tags are continuously polled from PLCs even if they are not shown on the screen Also ScadaMobile may continue polling them while running in the background So special care should be taken when deciding what tags will be reserved for alarms Particularly it is advisable to group alarms in tags as contiguous as possible and to use boolean alarms over scalar value alarms for as much as possible In protocols supporting arrays of BOOL they will be the best choice Observ ing this recommendation will lead to shorter communication patterns and less network overhead than if no special care
16. MEANING Allows for using a custom validation tag on protocols supporting it e For EIP NATIVE the validation tag name is always SMValidationTag it can not be changed e For EIP PCCC use validation_tag Nx y only N files can be used and the code is stored as an INT default is N98 0 e For FINS TCP use validation_tag Dx only DM area can be used and the code is stored as a WORD default is D19998 e For MELSEC TCP use validation_tag Dx only D area can be used and the code is stored as a WORD default is D8085 e For MODBUS a validation tag is not supported e For OPTO22 NATIVE the validation tag name is always and OptoControl Numeric variable Integer32 with the tag name SMValidationTag it can not be changed e For SIEMENS ISO_TCP use validation_tag MWx only MW can be used and the code is stored as a WORD default is MW998 If no attribute from this group is specified ScadaMobile will dynamically use default values or values from the application Settings tab view pag 37 101 www sweetwilliamsl com sweetwilliam ScadaMobile Global Attributes for Modbus devices The Modbus specification does not exactly define how the data should be stored in registers or in which order the bytes or words are sent The following global attributes help to deal with it Swapped words bytes options for modbus are global Vii Di 1 0m CEO ATTRIBUTES KIND byte_swap number boolean number boolea
17. PLC to store strings pag 46 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 11 Expressions Expressions are allowed on several attributes and provide an advanced way to customize various aspects of the interface and behavior of ScadaMobile projects Expressions allow for combining variables with operators and methods to produce custom results Variables are referenced in expressions by using their names as entered in Column A There are also several system variables that can be used for special uses Event Driven Architecture Expressions in ScadaMobile are stored in a compiled form and are executed by an event driven engine The execution engine keeps expression reference information in a way that value changes trigger expression evaluation The engine is not endlessly executing for loops but only change events The expressions engine keeps references to referring expressions to create a tree like network where all expressions have links to other expressions When a PLC tag changes or an user interacts on a control a change eventis triggered This event that occurs at some point in the expressions network is propagated through the relevant links to reach only the expressions that need to know about it generally only a few The result is that expressions execution time is basically independent of project sizes or the total number of expressions defined in projects The Event Driven Architecture is specially suitable for
18. Photo_Sensor D03 Mod00 Ch03 NIGHT JAC AN2IOCOC STT G aN U MAILS Y w aA tug Store_Temperature A11 Mod03 Ch00 Fuel_Level A12 Mod04 Ch00 2386 Gallons Fuel_Level 0 10000 Gallons 2386 z Turn On Alarm FY OFF OFF D04 Mod01 Ch00 tA PAC Controllers SNAP PAC S1 SNAP PAC S2 PAC Rack Controllers SNAP PAC R1 SNAP PAC R2 Soft Controllers SoftPAC pag 93 101 www sweetwilliamsl com sweetwilliam ScadaMobile Opto22mmp csv This example is based on the Opto22 s standard PAC Learning Center hardware and is designed to show ScadaMobile access ing the MMP area of a PAC Controller Download the associated demo software project Opto22_iOS_Demo rar from our site http www sweetwilliamsl com opto22 and install it using the free software PAC Project Basic 9 2 or higher It uses the generic modbus tcp protocol driver to access the device memory map communicating through port 502 To develop an interface in ScadaMobile using the mmp protocol it is necessary to have a working knowledge of Modbus Unit IDs and Register Addresses as used by the PAC Manager Inspect Tool The subject is fully explained in the Opto22 document 1704_PAC_Manager_Users_Guide pdf http www opto22 com documents 1704_ PAC Manager Users Guide pdf MMP protocol can be used to connect ScadaMobile to Opto22 Ethernet devices that do not have a control strategy database primarily to read inputs and write outputs gi vodafon
19. STRING sizes must be indicated in column B using round parentheses The square notation is still reserved for arrays so when you use them you will be referring to ARRAYs Consider the following cases STRING 20 This refers to a STRING with a capacity of 20 characters and should not be confused by STRING 20 STRING 20 3 This is an ARRAY of 3 elements each element is a string with a capacity of 20 characters STRING 20 This is an ARRAY of 20 STRINGs This is not a string of 20 characters Since the default string size for S7 is 254 256 bytes including the size and length fields you will end having an array of 20 STRINGs with a capacity of 254 characters each Actually you will end reading or writing a range of 20 256 5120 bytes on your PLC for this tag and your PLC will most probably reply with an out of range error pag 16 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 3 Specification of Variable Addresses column C A Variable Address represents a memory location a register or a Tag in a PLC to which a Variable refers Addresses are speci fied in different ways depending on which communications protocol they belong to Addresses belonging to different protocols can not be mixed in a particular Source File You must use at least one separate Source File for each PLC and Communication Protocol The particular protocol to use can be specified by means of a comment on the first line as described in Specification of Commu
20. and not all tabs are available to them The following screenshots show the available tabs for the Administrator user left and for a regular user right Product List gt Product List gt administrator user regular user pag 74 101 www sweetwilliamsl com A gt sweetwilliam ScadaMobile Managing accounts Accounts are managed in a navigation interface similar to the Contacts application The screenshot below shows that a new ac count named Tommy has been created which has an access level of 3 and that it is active all Carrier gt ull Carrier gt 6 12 PM User Settings Settings ccounts Edit Automatic login Default accounts vV administrator Manage accounts V nobody Other accounts File Server vV Tommy Port New account Omron FINS TCP defaults Settings f In order to log in a particular user tap on Current account You can also make ScadaMobile to ask for the current account password at launch In order to do so set the Automatic login switch in Settings to Off pag 75 101 www sweetwilliamsl com sweetwilliam ScadaMobile 7 Network Settings for local access ScadaMobile uses wireless TCP IP technology to connect and to communicate with PLCs Direct access from a local network requires both devices to be in the same subnet The PLC acts as the communications server and the iPhone or iPod Touch is the client The following picture shows a typical s
21. applicable to writable tags Presents the variable as a boolean even if it is not of type BOOL limiting the possible values to O or 1 It also activates related attributes such as on_label and off_label and brings the special meanings of some attributes for bool types Presents a variable as a slider control or a bar depending on whether it is writable Both are identical and can be used indis tinctly Min and Max values are given with the bounds attribute or the aux0 and aux7 expression attributes If the auxO or aux7 expressions are specified their values will override the bounds attribute thus enabling for dynamic scal ing of bars or sliders pag 30 101 www sweetwilliamsl com sweetwilliam ScadaMobile Nee ee TAG ATTRIBUTES KIND MEANING lookup Displays a text from a lookup table instead of the actual tag value The tag value is used to determine which entry in the table is shown For writable tags the bounds attribute is used to determine which range on the lookup table will be made avail able to the user for selection See Lookup Table picker If the auxO expression attribute is specified and contains an array the picker will display the contents of the given array in stead of the lookup table The resulting value will be an index to the chosen element from the array This provides a way to create pickers with dynamic choices The picker style has a bezel implicit style when used on wri table tags
22. characters fully match the 7 bit standard ASCII char acter representation str n m Substring Returns a substring of str starting at n and continuing for m elements Always returns a string Returns an empty string when access is out of bounds m can not be negative Example Hello world 0 4 results in hello Example Hello world 5 5 results in world Example Hello world 6 5 results in world str other_str Concatenation Example hello world will give hello world str1 compari String Comparison son_operator str2 Returns 1 or O true or false when comparing two strings for equality or as if they were sorted in a dictionary Example alpha lt beta returns true because alpha is before beta in a dictionary str to_i Parses a str into an integer value or returns 0 if not possible Example 3 to_i returns 3 str to f Parses a str into a floating point number or returns 0 if the conversion is not possible Example 3 2 to_f returns 3 2 str to_s Returns str formatted according to fmt if specified or str otherwise Only the s format specifier is str to_s fmt relevant for strings Example WorLd to_sC Hello s would give Hello World str splitCstr2 Creates an array of strings by splitting str using str2 as a delimiter but not including it If str2 is an str split empty string it splits str into each one of its characters If str2 is not given it returns an array with str as the si
23. demonstrate a set of valid symbolic tag names while accessing Allen Bradley Logix control lers TAG BOOL sint_value TAG SINT int_value TAG INT dint_ value TAG DINT timer1 PRE TAG DINT timer1 ACC TAG DINT timer1 EN TAG BOOL timer1 TT TAG BOOL timer1 DN _ TAG BOOL pag 88 101 122 13 67 1000 223 iPod 21 51 al Tags indx_var 1 3 2 TAG INT struct_var member1 TAG INT struct_var realMember TAG REAL struct_var boolMember TAG BOOL oe struct_var indxMember 0 TAG INT struct_var indxMember 1 TAG INT struct_var indxMember 2 TAG INT struct_var indxMember 3 TAG INT indx_struct_var 3 memb TAG INT 31 32 2 71828 OFF 35 36 37 38 39 www sweetwilliamsl com sweetwilliam EIP_PCCC_Examples csv The purpose of this example is to demonstrate a set of valid symbolic tag names while accessing Allen Bradley Micrologix con trollers PagesExampleModbus csv ScadaMobile This example shows how to arrange tags in several pages It uses arbitrary Modbus Coils and Registers pag 89 101 iPod 21 55 Overview Valve Control B gt Process Data O gt Status Data iPod 22 11 4 Process Data a se e F ga g g a lt i ma SNe te ee taet ee ee ee ee Oe Pump 1 Current Pressure 12 3 Pump 2 Current Pressure 11 8 Bea
24. doc_picker Allows for selection of a file under the Documents category on the files tab audio_picker Allows for selection of an Audio asset from the ScadaMobile playlist on the device s iPod Library Tags with this style are referred to as Alarm Tags and they are not shown on the main table but on the Alarms Panel This is equivalent to type Alarm barcode Activates the barcode reader for this tag The tag must be wri table usually of type STRING After reading a barcode with the device camera the tag value will be updated with the scanned code pag 31 101 www sweetwilliamsl com sweetwilliam ScadaMobile snr rr TAG ATTRIBUTES KIND MEANING expression In a row with the type attribute set to viewer the String Expression assigned to this string attribute provides the File Name of a document stored under the Documents Cate gory to be presented when the tag value for this row transitions to the true state In combination with the player type the File must be a playable audio file stored un der the Documents Category or an audio asset from the device iPod Library Only iPod Library items moved into a Playlist named ScadaMobile will be playable by this app Alternatively a http Link to a Web Site or a link to a remote file residing on a web server can be provided to be presented or played instead Example type viewer url myManual pdf will display the file myManual pdf
25. e Added section PLC Memory Arrays and Access Patterns e New bool barcode and validation_tag attributes or styles added to the Tag Attributes section e Changed placement of sections Comments in Data Sources and Specification of Communication Protocol e Extended section Expressions to cover Strings and Arrays e Extended and renamed section Supported Operators and Operator Precedence e Added section Data types in Expressions extending and replacing some subheadings in the old Expressions section e Updated section System Variables e Added section Functions Methods and more about Operators e Added section Putting it all together Advanced Expressions Examples e Added chapter Performance e Added Document Revision History pag 100 101 www sweetwilliamsl com A lt gt We ectwittiam ScadaMobile SweetWilliam S L Contact Information SweetWilliam S L Llevant 10 17844 Cornella del Terri Spain Tel 84 972 59 51 39 e mail support sweetwilliamsl com Web hitp www sweetwilliamsl com pag 101 101 www sweetwilliamsl com
26. exhaustive Most interface elements will be described as needed in the sections that follow this one 2 1 Tabbed interface ScadaMobile uses the typical iPhone tabbed interface to organize several aspects of the app On each tab a Navigation inter face is usually presented Not all tabs are available to all user accounts and not all the options in a tab are accessible to all us ers Five tabs are available from left to right Settings Available to all users but with restrained options for non Administrator users You can create accounts log to a particular ac count set several user interface behaviors and specify default communication settings Non Administrator users have all options banned except the Log In feature Files Only available to the Administrator user Presents several lists of categorized files such as source files containing tag defini tions documents for use with the type viewer attribute and presents import and export options including the embedded Web Server From this tab administrator users are able to select the relevant source files and document files for an application Alarms Available to all users for reviewing and acknowledging alarms Connections Available to all users but with restrained options for non Administrator users Presents a series of entries called connections that represent actual links to PLCs Within each connection you are able to check the communication status and to set
27. l Gateway Address 192 168 1 1 Current Port Speed 100 Mbps Primary DNS Fab gt Server Address 0 0 0 0 Select Duplex Full Duplex For EIP PCCC protocol use Allen Bradley s RS Logix 500 tool and set a fixed local IP for the PLC on the Channel Configuration panel ee 0 0 0 0 Current Duplex Full Duplex Changes to Port Speed and Enable Bootp Duplex require module reset Enable DHCP DHCP must be configured to return a fixed address V Enable DNS F Auto Negotiate Port Speed and Duplex Refresh Set Status Running Cancel Help For PLCs or devices based on the Modbus TCP protocol or Siemens ISO_TCP consult the relevant vendor documentation to know how to set ports and addresses pag 77 101 www sweetwilliamsl com sweetwilliam ScadaMobile 7 2 ScadaMobile Settings for local PLC access ScadaMobile configuration depends on whether you have specified communication attributes for Source Files See Specification of Attributes for further information For Sources without communication attributes ScadaMobile uses the default ports and addresses entered into the relevant fields on the settings tab Enter the values you used for the PLC settings and select the desired polling rate aul movistar 17 00 Settings Remote Port Siemens ISO_TCP defaults Remote Port 102 Default Connection Local 192 168 1 38 P Remote mydns dyndns org Enable SSL OFF Poll Rate Gs
28. lookup method provides expressions access to the global Lookup table see section Look up Table for a discussion on lookup tables This method picks the text from the global table at index n and returns it as a string If the table does not have an entry for n returns Example Provided that entry 1 of the lookup table is Entry at index 1 then SM LookupC1 will return the string Entry at index 1 SM color r g b Returns a numeric representation of a color ready for use on the color attribute You can either SM color str provide the RGB color coordinates as values ranging from O to 255 in r g and b or you can pro vide a string with the color name in str Refer to the color attribute for further information on avail able colors SM devicelD Returns an unique identifier string representing the iOS device the app is running on The returned string is always the same for the same device but a different value is returned for different devices Returned values will look like this 846AB563 76Q0E 45BA 8E9E 88BELD ASED7 pag 58 101 www sweetwilliamsl com Math methods Math atan2 y x Math cos x Math expCx Math LogCx Math Log10Cx Math sinCx Math sqrtCx Math tanCx Math PI pag 59 101 sweetwilliam Description Computes the principal value of the arc tangent of y x using the signs of both arguments to de termine the quadrant of the return value The atan2 function is used mostly to co
29. returns 1 Example 3 1 returns 1 Example 3 2 returns num to_i Returns the integral part of num Example 3 666 to_1 returns 3 num to_f Returns num num to_s Returns a string representation of num optionally formatted according to fmt For a description of num to_sCfmt possible format specifiers refer to the format function Example 3 666 to_sC 2d results in 03 Example 3 666 to_sC 02f results in 04 Example 3 666 to_s results in 3 666 Example 25 to_sC 2 1f C results in 25 0 C Note that specifying a format in to_s is not a standard feature of Ruby num chr Returns a string containing a single character represented by the Unicode character code num Example 72 chr would return H num abs Returns the absolute value of num Example 3 66 abs would return 3 66 num round Returns num rounded to the nearest integer Example 3 66 round would return 4 pag 54 101 www sweetwilliamsl com sweetwilliam ScadaMobile String operators and methods STRING Description Creates and returns a string containing the sequence of characters written between quotes strLn Gets the Unicode representation of the character at index nin str If nis negative indexes start at the last character Generates an error when attempting an out of bounds access Example Hello world returns 72 72 is the Unicode character representation of H Unicode representation of English Language
30. setting off the automatic login switch in ScadaMobile settings tab a password key will be asked each time the app is launched thus preventing people not knowing the password from using the app Additionally Apple provides a service for blocking lost or stolen devices so that no one is able to access to data or execute apps in them until the real owner reactivates them pag 81 101 www sweetwilliamsl com sweetwilliam ScadaMobile 9 1 Validation Codes For most protocols ScadaMobile requires a validation code being held by the PLC which is queried on each connection This password must be stored in your PLC as a 16 bit hexadecimal value 0 to FFFF and must match the value specified in Valida tion Code for connections to that PLC to succeed In most cases this security measure alone is enough for simple applications Validation Codes are stored in PLCs in the following Memory Address or Tag depending on protocol TION TAG EIP Native SMValidationTag Any INT value This tag must be present in order for ScadaMobile to communicate Set initially to 0 to avoid having to enter it on Scada Mobile during development stages EIP PCCC Any INT value This tag must be present in order for ScadaMobile to communicate You may have to create a Data File number 98 of type Integer with at least 1 element FINS TCP D19998 Any value from 0000 hex to FFFF hex is valid Omron Melsec TCP Any value from 0000 hex to FFFF hex is valid
31. the color to be used in trend graphs when plotting this tag If omitted a text sequential color is chosen automatically pag 34 101 www sweetwilliamsl com sweetwilliam ScadaMobile Tag Attributes for Modbus devices Modbus registers can be accessed on a PLC using serial communications through a Modbus RTU to Modbus TCP Ethernet gateway You can specify a slave id when using this feature slave_id number This attribute identifies the associated tag as belonging to particular modbus device Particularly modbus serial devices with the specified id that are connected through a TCP gateway will be accessed The default value is 1 Note that the slave_id attribute for Modbus is a Tag attribute so it applies only to the register it is next to This is in contrast to the controller_slot attribute which is global and applies to a source file pag 35 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 4 3 Global Attributes Global Attributes are modifiers that apply to all tags or have a meaning in the context of the whole Source File Global attributes can be placed anywhere in column D of source files So they can be specified next to any variable and they will still have a glo bal scope NOTE If a particular global attribute is included more than once in a source file only its first occurrence will take effect Communication settings are global and therefore they need to be specified only once in a source file
32. they are above 50 color_bounds 50 50 Tag values from 50 to 50 will be excluded from displaying in the color set in the color attribute Therefore tag values will be displayed in the specified color only when they are below 50 or they are above 50 effectively ena bling coloring for edge conditions For boolean tags the co or_bounds attribute has a predetermined value that will al ways make the tag appear in the co or color for the On state pag 33 101 www sweetwilliamsl com sweetwilliam ScadaMobile TAG ATTRIBUTES KIND MEANING special text tint_co value list A two elements list in the form low high where low and high are numeric values de lor_bounds termining the range of values for the tag where the tint color will NOT apply also known as an exclusion range Look at the color_bounds attribute for more informa tion When both tint_color_bounds and color_bounds attributes are specified col or_bounds takes preference over tint_color_bounds However tint_color_bounds still has the chance to act in the range that has been excluded by color_bounds allowing for further color customization based on tag value Combined Examples color_bounds inf 50 tint_color_bounds inf 0 Will display all values above 50 in the color color positive values up to 50 will be displayed in the tint_co or color color_bounds 50 50 tint_color_bounds 20 20 Will display all values be low 50 and above 50 in the col
33. to the user interface execution This essentially decouples user interface execution from PLC communica tions From a user perspective the app behaves as if only the user interface was running If you are concerned about performance or you are planning a really big project the best advice is to do some planning follow ing the above recommendations even before implementing your project Then profile periodically for performance as you add more rows to it pag 85 101 www sweetwilliamsl com sweetwilliam ScadaMobile I2 Examples The ScadaMobile application comes with pre installed examples that can be used directly or can be downloaded to a PC to be used as templates for your own development The provided examples are the following EXAMPLE PROTOCOL NICATION STYLES ALARMS PRES ATTRS SIONS O mse a e ves o o o T oeme ieee wor o NOW COO E EEES ere tones ween enane o WOW HO C ev rece mammon useen empece wo wo wo wo Cremcomoemnen weet wearer we e e o seston useen memene no vs WW ne wo wes m0 wo nematotinen wed wor no es es o wae econ memen ermee no wes wes Wo concent tet were mo es we wo comnscowooar pecco useen amrece no VB WO WO eros renen omenana wo ves v ve remo rer were re re e oe a CommunicationsState csv MS Excel pag 86 101 www sweetwilliamsl com sweetwilliam ScadaMobile QuickInOut csv Thi
34. valida tion codes for PLCs Also relevant communication settings and error information is presented for Sources and connections You can also switch monitoring on or off from this section Non Administrator users are only allowed to switch monitoring on or off from this tab Connections and all related information is hidden for these users Home This is the main view and the place where actual tags variable values and any calculations are presented It is available to all users but access level on tags will be applied depending on the current source files configuration so what each user views may vary Trend graphs and Alarms are also displayed in this tab pag 6 101 www sweetwilliamsl com sweetwilliam 2 2 Variables in ScadaMobile ScadaMobile Process variables or Tag values coming from PLCs are organized in ScadaMobile as a list with sections in a similar way than the Contacts Application Depending on variable type style and other characteristics specific display may vary On the left side of each row relevant information for identifying variables such as their name or their particular role in the moni tored process is displayed On the right side real time values of variables or suitable controls for interacting with them are shown wall movistar gt 21 09 a aj Tags NA CN CRAL Main Run Stop Switch Main Process Start Stop WE lt WAICNA IAIA Tank Level L Water Tank Current Level
35. variable may hold a completely different type The following considerations also apply INTERNAL tags with a value expression evaluating as a constant value will use it as the initial value for the tag Otherwise internal tags will be initialized to zero or an empty string upon initial project launch Writable INTERNAL tags will simulate a write read round on a virtual PLC taking into account tag type scale and bounds attributes with the same effects as a real write read round as described above special Text in the form m n where m represents the minimum number of characters to be text displayed If the value to be displayed is shorter than this number the result is pad ded with blank spaces or zeroes if the number starts with zero The value is not truncated even if the result is larger n represents the number of digits to be displayed after the decimal point An optional format specifier character can be appended to n for further customization See Format Specifiers Example format 07 2 will display the REAL value 12 345 as 0012 34 Example format 8x will display the DINT value 1 as ffffffff expression Numeric expression Will make the row hidden when the result of the expression is boolean non zero Hiding all rows in a Section will remove the entire section including the sec tion title Hiding all rows sections on a page will remove that page from the interface Hiding showing interface elements is fully anim
36. was taken ultimately improving the end user experience pag 42 101 www sweetwilliamsl com A lt We ctwittiam ScadaMobile 3 1 8 Comments in Data Sources You can comment Rows on Source Files for documental purposes or while you are testing your project To do so just start the row with the character Examples These are the Lookup table entries for the style selection texts we are using This alarm checks for a value being too high on the statistics page 3 1 9 Specification of Communication Protocol Starting with version 1 5 you can explicitly set the communication protocol on source files instead of having ScadMobile deter mining it by the kind of addresses used in Column C as before This feature has been provided to grant future compatibility with a larger number of communication protocols where some addressing naming conventions could conflict or overlap existing ones To tell the actual communication protocol on a source file you must insert the following comment as the first line protocol lt protocol_string gt As lt protocol_string gt you can use one of the following etp native eLp pccc fins tcp meLsec tcp modbus tcp opto22 native siemens 1so_tcp For example to communicate with an Allen Bradley ControlLogix controller you would have the following as the first line on your source file protocol eip native NOTE Protocol Specification in this way will be made obligatory in the future for al
37. 00 Level at which pumps stop Mid Level Set Point L 350 Level at which pump 1 stops Low Level Set Point L Level at which pumps start 100 7 Limit Switch Valve 1 Completely Open OFF Limit Switch CLOSE Valve 1 Completely Closed NOTE The provided PLC program section uses TIMX instructions so you may have to select Execute timer counter as bi nary on the Properties settings of the PLC before importing this example into CX Programming FillATankWSource cxr Identical to the previous example except that communication attributes are incorporated into the file pag 87 101 www sweetwilliamsl com sweetwilliam DataTypesModbus csv ScadaMobile This serves the purpose of showing the supported data types with a focus on Modbus devices This file was created in MS Excel and does not require any program in the PLC DataTypesModbusWSource csv iPod 21 28 aj Tags UINT HOLDING REGISTER HR00005 UINT UINTValue HR00005 UINT DINT HOLDING REGISTER DINTValue_ReadOnly HR00006 DINT DINTValue HR00006 DINT 12345 987654321 987654321 UDINT HOLDING ISTER UDINTValue_ReadOnly HR00008 UDINT UDINTValue HR00008 UDINT 123456789 123456789 HOLDING REGISTER REALValue_ReadOnly HR00010 REAL REALValue HR00010 REAL Equal to previous example but containing communication attributes EIP_TAG_Examples csv 3 14159 3 14159 The purpose of this example is to
38. 0000000 XOR 0000000000000000 al X ad all movistar gt 14 25 aillmovistar gt 14 26 dj Example 8 4 Example 10 Scanner 14 25 a Example 7 ScadaMobile ONE U _RGB Color _Input Values A 7 0 _R Value FF l C a TG Value 80 B l eps C CE e B Value 00 Select A or B w Slide Values and Select A or B D Blink OFF _ Results Select Blink state Colored Values Color Code hex Colored Color by Name Color Name Enter Color Name Blink Select Blink state pag 97 101 Ternary Operator This is Always Updated 50 0 If Clause FF8000 This is Updated on Selection Change 50 0 COLORED TEXT Green OFF You Just Scanned ScadaMobile ONE THANK YOU FOR SCANNING ME www sweetwilliamsl com sweetwilliam International ONE txt ScadaMobile Demonstrates the use of International Languages in Text attributes and String expressions This file was written in a text editor and saved as Unicode UTF 16 text format The example is self contained and works using only INTERNAL tags pag 98 101 aullmovistar 14 20 my PT E sweetwilliam fa lai wn Oe ERRIA H455 RREA PX 0 gt MexaynHnapoanbi npnmep A gt International Example IIL Y F LRR Japanese www sweetwilliamsl com sweetwilliam Document Revision History Refer to this section to look at changes on this docu
39. 101 www sweetwilliamsl com sweetwilliam Aphorism ONE csv ScadaMobile Demonstrates de use of advanced Numeric String and Array expressions on attributes A feature is shown on each page ap proach The example is self contained and runs using only INTERNAL tags The following goals are demonstrated 1 Convert total seconds to a string in the form hh mm ss Alternate display Time Temperature Conversion between degrees Celsius and Fahrenheit Display Date Time string in several formats Default American Style German Style 2 3 4 Convert to and from Rectangular and Polar coordinates 5 Use of Binary Input and demonstration of Bitwise Operations 6 Access to the global Lookup Table and use in formatted expressions 7 Demonstration of the Bar Code Scanner tag style 8 Arbitrary custom Coloring and Blinking of values 9 Arbitrary custom Text on Boolean values 10 Conditional operations using either the Ternary operator or the If Clause auil movistar gt 14 26 aul movistar gt a Example 1 4 Example 5 _ Input Values Total Seconds _Bitwise Operations Input Value A Scan Enter total seconds Enter binary data 0 j Scanner Input Results m Value B o Formatted Value _ Total Time 01 01 01 Enter binary data s J Time string hh mm ss i Bitwise Operations Result S AOO OR MM AND 0000000000000000 ime string hh mm ss Total Seconds Calculated back from the time string 3661 s OR 000000000
40. 1s 05s FE E rt Settings pag 78 101 www sweetwilliamsl com sweetwilliam ScadaMobile 8 Network Settings for remote access ScadaMobile is designed to communicate with PLCs without using dedicated servers or any specific software installed on a PC ScadaMobile communicates with PLCs by using industrial protocol commands To establish a remote connection a GPRS or DSL router is needed at the PLC site which will act as a bridge between the LAN Local Network where the PLC is installed and the WWAN or WAN Internet to which a remote iPhone or iPod Touch will have access to This figure shows a standard setup Internet Local Network WAN IP myname dyndns org LOCAL IP 192 168 1 40 LOCAL IP 192 168 1 1 First determine the LOCAL IP address of the GPRS or ADSL router PLCs need to know the router address as it is the gateway to the internet 1 In case of Omron Fins TCP copy the PEI Rantrh alia R router address in the IP Route Table field of the ethernet configuration panel for the Setting FINS TCP DNS SMTP POP Mail Address Mail Send Mail Receive Clock Auto Adjustme PLC in CX Programmer Broadcast FINS UDP Port FINS TCP Pot j TCP IP keep alive CATEI Dama Goon Dain 660 0 min ear Al 0 4 2BSD User defined User defined IP Address Conversion r Baud Rate FINS UDP Opti
41. 2 Export variables in a Reusable symbols file with cxr extension label Closed comment Valve 1 Completelly Closed access 3 To do th is select Reusable File gt Save AS 7 on the mouse rig ht ord 3030 A section VALVE 1 label Man Auto comment Manual Open will stop process acce Pumpi Fow REAL 12 label Input Flow 1 L s comment Current Input Flow 1 access label Running comment Pump 1 Run state acce cl ick men u over the selected sym bols poo tid fea Taane Insert Symbol 3 label Failed comment Pump 1 Fail state aco Auto comment Manual Run will stop pr Valve_2 open BOOL W22 00 l J Validate Symbols ALVE 2 n comment Valve 2 Completelly Open TEZ back Cleared commen ibe 2 Cairo Cee aes BOOL w22 01 a oa Valve_2_failed ere MA Ay 2 Large Icons BOOL T Small Icons M oumo 2 Fon rea oE sed comment Valve 2 Completelly Closed 2 Man Auto comment Manual Open will stop process acce Input Flow 2 L s comment Current Input Flow 2 access Running comment Pump 2 Run state access 3 Pump_2_failed BOOL 22 04 Pump_2_mode BOOL H2 01 db Cut Sim_Output_Flow REAL D16 Copy Sim_Pump_1_Flow REAL D18 gm Sim_Pump_2_Flow REAL D20 Delete Reusable File Properties 353 CTS s ioia 3 P_Off oop 2 H
42. 6 you may chose to use one of the 8 bit or multibyte encodings that are commonly used by default on lo calized versions of Windows and Excel To do so follow the next steps e Create a source file with Strings on your language using your default localized version of Excel as usual e You must explicitly tell ScadaMobile the right string encoding of your file See below e Export the file as usual Excel will use the default encoding for your localization Import the file in ScadaMobile ScadaMobile will use the explicit encoding to open the file pag 44 101 www sweetwilliamsl com weetwilliam ScadaMobile Setting a Explicit String Encoding To set a explicit String Encoding for your file place the following command embedded in a comment on top of your file encoding lt string_encoding gt For example to set Japanese you can write encoding Japanese Win The following explicit string encodings are supported EXPLICIT ENCODIN Description WindowsLatin1 Identifies the ISO Latin 1 encoding ISO 8859 1 This is the default UTF 8 Identifies the Unicode UTF 8 encoding MacRoman Identifies the Mac Roman encoding Used on western localizations of Mac OS Useful when you use diacritic characters Spanish French German the degree simbol but you do not want to export your file as csv windows Cyrillic Mac Identifies the Mac Cyrillic encoding recne aaa ee Strings in source files containing UTF 16 characters wil
43. ATTRIBUTES KIND MEANING text Source address in text format for local access LAN Example local_ip 192 168 1 40 local_port number TCP port used for local connections LAN to this source If it is not specified Scada Mobile will use the standard port for the protocol of the current Source File For ex ample 502 for Modbus Note that this can differ from the default port specified in ScadaMobile settings tab Example local_port 502 remote_host text Source address or symbolic DNS host name for remote connections Example remote_host myhost dyndns org remote_port number TCP port used for remote connections to this source WAN Internet If it is not speci fied ScadaMobile will use the standard port for the protocol of the current Source File Example local_port 504 number Specifies whether TLS SSL encryption is required for a remote connection Non zero boolean numeric values are considered true Default value is false This attribute is meant to be used with Internet routers supporting TLS TCP bridging on the PLC side polling_interval number Allows for specifying the desired polling rate for communications expressed in sec onds The default is 2 seconds A value of zero 0 is also possible this means top speed i e no delay between reads Example poll_interval 0 5 pag 36 101 www sweetwilliamsl com ATTRIBUTES validation_tag sweetwilliam KIND special text ScadaMobile
44. BA for 16 bit values str_byte_swap is only attended in combination with the CHAR or STRING data type It provides a way to swap odd and even bytes on character strings without affecting behavior for numeric data types NOTE These attributes are only meant for Modbus communications and are ignored for the rest of supported protocols pag 38 101 www sweetwilliamsl com sweetwilliam ScadaMobile Global Attributes for Allen Bradley controllers Allen Bradley ControlLogix controllers can be plugged in any slot on the backplane Ethernet IP messages can be sent connec ted or unconnected The following attributes can be used to determine these characteristics These are global attributes controller_slot number Identifies the slot where the Logix controller is located Default value is O It is ig nored for EIP PCCC communications SLC and Micrologix connected_mode number When true ScadaMobile will use connected messaging instead of the default boolean unconnected messaging for retrieving data from Ethernet IP enabled PLCs Look below for a discussion on what possible effects you might expect Default value is false ScadaMobile currently supports two EIP mechanisms to send commands to AB PLCs 1 For a Micrologix or SLC it will send PCCC commands DF 1 embedded in EIP using a direct path 2 For a ControlLogix CompactLogix it will send native CIP commands using a Backpane Slot Number path The
45. Backpa ne defaults to 1 and the Slot number is given in controller_slot ScadaMobile uses CIP Explicit Messages to retrieve and send data from to Ethernet IP enabled PLCs Explicit messages can be sent unconnected or connected Connected messages require a Connection ID which is first asked to the PLC before sending other messages while unconnected messages identify the specific path to the destination in the same message Connected messaging is generally considered to be more reliable than unconnected because it reserves buffer space in the PLC for the message and is therefore less likely to be blocked by other message traffic However if the TCP link between the message originator and the receiver is weak or prone to fail unconnected messaging may be a better choice Wireless spots or carrier networks can easily drop due to lack of coverage or weak signal in these cases connected messaging communications may take longer to reestablish after a fault resulting in less overall reliability and more user perceived delays than unconnected messaging ScadaMobile uses unconnected messaging by default but you can set it to use connected messaging for a source file by setting the connected_mod e attribute to true Global Attributes for Siemens S7 controllers For Siemens S7 controllers you can use the controller_slot to give appropriate rack and slot number ATTRIBUTES KIND MEANING controller _slot number Identifies th
46. Calendar hour for an absolute time time at the current time zone location Range of returned values is 0 to 23 time min Returns the Gregorian Calendar minutes for an absolute time time at the current time zone loca tion Range of returned values is 0 to 59 time sec Returns the Gregorian Calendar year for an absolute time time at the current time zone location Range of returned values is 0 to 59 pag 57 101 www sweetwilliamsl com sweetwilliam ScadaMobile Built in functions FUNCTIONS Description formatCfmt Returns a string in which the list of arguments following fmt is formatted according to fmt fmtis a Formating specification string Formatting specifications in fmt are essentially the same as those of the sprintf function in the C programming language Conversion specifiers in fmt begin with and are replaced by a formatted string of the corresponding argument A character followed by an other will yield the character A list of supported conversion fields is given on the next sec tion Examples formatC Room Temperature is 4 1f 25 will return the string Room Temperature is 25 0 formatC 02d 02d 02d hours minutes seconds may return the string 01 15 48 as suming the variables hours minutes and seconds contain the same values format Throughput 4 1f 25 will return the string Throughput 25 0 System methods SYSTEM Description SM Lookup Cn The
47. Color 1 write_access 0 color2 UDINT INTERNAL label Color 2 write_access 0 colorSelection BOOL INTERNAL label Select Color style Switch write_access 0 coloredValue DINT HR1 label Colored Value color colorSelection color1 color2 The coloredValue color will be always updated according to colorSelection after any change of color1 or color2 pag 61 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 11 7 Putting it all together Advanced Expressions Examples Converting an arbitrary number of seconds to hh mm ss format The following expression shows how to get a string in the form hh mm ss from a numeric value containing seconds In this ex ample x contains the total number of seconds to be converted to the desired format value LCx 360 to_sC 2d CCx 3600 60 to_sC O2d Cx 6 to_sC O02d joinc The operators and are used to calculate hours minutes seconds as numeric values These are then truncated to integer with the to_ method and successively converted to formatted strings with to_s The resulting individual strings are embedded into an array and then joined by means of the the join method using as separator Given the following two rows X DINT HR1 label Total Seconds t STRING INTERNAL label Time value x 3600 to_s 02d x 3600 60 to_s 02d x 60 to_s 02d join when HR1 holds 3661 which is 3600 seconds 1 hour 60 s
48. II characters share the same codes when represented in Latini encoding 3 1 10 2 String Encoding for International Languages If you use a language that can not be represented with the Latini encoding you are still able to import your files containing in ternational characters in text attributes Additionally international characters are supported in Strings and they can be written and read back from PLCs without breaking their particular encoding There are two ways for using international characters in ScadaMobile Unicode UTF 16 encoding 16 bit multibyte encoding The UTF 16 encoding is capable for representing any character from virtually any language in the wold To make use of this en coding you can do the following e Create a source file with texts in your language using your localized version of Excel as usual Export the file as Unicode UTF 16 text e Import the file as usual in ScadaMobile ScadaMobile will automatically detect files encoded as UTF 16 Unicode strings will be converted to UTF 8 before storing them on PLC memory NOTE Strings in source files containing UTF 16 characters will be converted automatically to UTF 8 regardless of the Explicit Encoding specified on the source file as defined in the next sub heading Any Explicit string Encoding given in a source file will be thus ignored if the file was already UTF 16 encoded Explicit Localized encodings 8 bit or multibyte encodings Instead of using UTF 1
49. ING size n Bradley controllers can hold up to 82 character bytes Siemens S7 controllers require a size specifica tion for strings Notice that size is given between parentheses NOT square brackets Note that STRING n does not indicate a string containing n characters but an array holding n strings with default capacity Particularly do not confuse with CHAR n or STRING n which will hold a single string with a capacity of n bytes By default Strings on controllers are interpreted as per the WINDOWS LATIN1 encoding but other encodings are possible if a Explicit Encoding or a UTF 16 file is given See International Characters Support The STRING type should be used with the appropriate string memory area or string tag type in controllers supporting them The use of the STRING data type is not limited to controllers with particular support for strings See section Representation of Character Strings in PLCs below for further information pag 13 101 www sweetwilliamsl com DATA TYPE CHAR size n CHAR size LOOKUP sweetwilliam ScadaMobile REMARKS Similar to STRING except that it does not insert a leading length word It can be used on protocols with no specific support for strings such as Modbus In this case size indicates the string buffer length i e the number of character bytes that should be allocated in the PLC for the string starting from the address specified in column C Note that CHAR 20 would technica
50. PEN off_label CLOSED write_access 9 label Segment Style BOOL style segment_switch write_access 9 label Default Button Style BOOL style button write_access 9 label Labeled Button BOOL style button button_label START ord 311 section INPUT REGISTERS ord 314 section INPUT REGISTERS ord 321 section INPUT REGISTERS ord 324 section INPUT REGISTERS ord 330 section INPUT REGISTERS ord 411 section INT HOLDING REGISTER ord 412 section INT HOLDING REGISTER write_access 9 ord 414 section UINT HOLDING REGISTER ord 415 section UINT HOLDING REGISTER write_access 9 ord 421 section DINT HOLDING REGISTER ord 422 section DINT HOLDING REGISTER write_access 9 ord 424 section UDINT HOLDING REGISTER HR8 ord 425 section UDINT HOLDING REGISTER write_access 9 HR10 ord 430 section REAL HOLDING REGISTER HR10 ord 431 section REAL HOLDING REGISTER write_access 9 M 4 gt rN DataTypesModbus ik ScadaMobile looks for the following information on each column Column A Variable Name Column B Data Type Column C Variable Address Column D Tag or Global Attributes including Display and Communication Attributes pag 11 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 1 Specification of Variable Names column A Variable names are entered in column A they must begin wi
51. PLC We will use examples based on the modbus protocol to discuss each possible case The same paitters will work on all pro tocols for similar types and data sizes The following access patterns are possible 1 Accessing 1 bit data size memory areas as single values modbus coils e BOOL SINT INT DINT in column B e Cx in column C The variable in column A gets the value of Cx 0 or 1 regardless of its type Example get value at C1 as INT testlag INT C1 testTag will contain O or 1 depending on the value in C7 2 Accessing 1 bit data size memory areas as an array modbus coils e BOOL n SINT n INT n DINT n in column B e Cx in column C The variable in column A will be an array containing n elements of the specified type Bits in each element will be taken from the PLC memory from the less significative to the most significative Example get array of 2 INTs starting at C1 testTag INT 2 C1 Array element 0 testTag 0 will contain bits from C7 to C76 Array element 1 testTag 1 will contain bits from C17 to C32 Example array of 10 BOOLs starting at C1 testlag BOOL 10 C1 Array element 0 testTag 0 will contain C7 Array element 1 testTag 1 will contain C2 Array element 9 testTag 9 will contain C10 3 Accessing regular PLC memory as single values valid on all protocols e BOOL SINT INT DINT REAL STRING CHAR n in column B e HRx in column C The variable in column A gets the value of HRx
52. Phone produc tivity apps the interface consists on a Navigation Bar on top and the Tab bar at the bottom of the screen The standard iPhone status bar is always visible in ScadaMobile Status Bar Navigation Bar ee Main Process Start Stop on STOP eer a gt Pump 1 Run state Tank Level L 330 H Water Tank Current Level Fail Status NORMAL Pump 1 Fail state Output Flow L s 14 Man Auto a Current Output Flow from Tank Pump 1 Pump 2 Manual Run High Level Set Point L D Level at which pumps stop Tags Table Run Mid Level Set Point L STOP l Pump 2 Run state Level at which pump 1 stops Fail Status NORMAL Low Level Set Point L Pump 2 Fail state Level at which pumps start Man Auto VALVE 1 Pump 2 Manual Run Limit Switch VALVE1 Valve 1 Completely Open Limit Switch Limit Switch Valve 1 Completely Closed Tab Bar v a Man Auto Manual Open will stop process Tab Bar and Navigation Bar Hidden Tab Bar and Navigation Bar To optimize the available space on the Home Tab view users can chose to hide the Tab Bar as well as the Navigation Bar as shown on the above screen shoots You can interact in the following ways on these basic interface elements To hide or to show the Tab Bar on the Home View use the Hide bottom bar option on the Settings tab To scroll to top of the tags table tap on the status bar of the iPhone screen To hide or to show the Navigation Bar on the H
53. Sources You must follow the following steps 3 3 1 Build a Project in RS Logix 5000 Create or open an already created RS Logix project If you are a PLC systems integrator or programmer you already know how to do it A description on how to program a PLC is beyond this manual You could need some help from an Allen Bradley integra tor or may ask them to do all the steps for you 3 3 2 Export Controller Tags from RS Logix 5000 Unfortunatelly RS Logix does not provide a way to select and export se Controller Organizer lected tags to a file However it is possible to do a bulk export containing all a D T Ea global Controller Tags LA kaaneni Controller Faul New Tag Ctrl w In RS Logix click Export Tags on the right button menu over Controller Tags Power Up Han l ie l Tasks Monitor Tags RS Logix will generate a special CSV file containing all global tags present in GE dica Motion Groups Edit Tags the project AREP Veri Tag Source files generated in this way can contain attributes as described in anakke Specification of attributes If you need to specify attributes for ScadaMobile you can give them in the Description column of the Controller Tags view in Print RS Logix This is equivalent to filling column D on an Excel generated Source NOTE Files with CSV extension created by RS Logix as described in this section are structured differently than CSV files created in Excel as described
54. Weight Value went above 6 kg Second alarm in group 2 did become active Weight Value went below 3 kg AlarmsEIP_PCCC csv Identical to the previous one but based on the Ethernet IP PCCC protocol pag 91 101 ScadaMobile Group 2 Someone Manipulated the Switch 2 total active alarms www sweetwilliamsl com sweetwilliam ColorfulControlsModbus csv ScadaMobile Presents ways to specify colors based on value in tags and controls The example is based on the Modbus TCP protocol wall movistar 16 05 4 Page 1 COLORED BUTTONS Push Red to do something Purple Colored Button Push Purple to do something Olive Colored Button Push Olive to do something Green Colored Button Push Green to do something Default Button Push Button to do something COLORED VALUES DarkRed Red Default Red DarkRed Select Value for tag above al a 3 PURPLE OLIVE 239 146 239 146 Es Colored Value Dark Blue above 100 Red above 200 Colored Input Value Dark Blue above 100 Red above 200 ColorfulControlsEIP_PCCC csv 266 9 266 9 l Identical to the previous one but based on the Ethernet IP PCCC protocol pag 92 101 wall movistar gt 16 06 4 Page 2 INDICATORS Moisture 68 9 A 8 Light 89 1 a STATUS l a Temperature Temperature within 10 to 35 C normal range Moisture aay Range 20 to 80 Within range high Light Range 20 to
55. Writable BOOL Segment_switch Style An Alternate way to switch a bool Default Button Style You can use a button instead Custom Button Style TEXT And add a custom text on it a e leeleli ce tN NE See ee SRA EE Conveyor Motor state Conveyor Moving Conveyor Control RIGHT Push to move Right Conveyor Control LE Push to move Left Engine Start Switch Tap to start stop Engine 760 1CEXt LOOKUP Stylie Everything is OK Human presence detected in the restricted area pag 7 101 iPod 21 36 Scaling Formating Scaled and Formated Value Wot 3 399 kg Bar Style Weight 3 399 kg Slider Style 3399 g e Format in Writable Value Writable value with bezel and format Writable Value Writable value with no style Default Style Values are displayed this way with no style Default Style REAL value A real value with no style Bezel Style Writable value with bezel style 3 399 kg 3399 3399 35 0534 35 0534 AN Home Output Flow L s Current Output Flow from Tank High Level Set Point L Level at which pumps stop Mid Level Set Point L Level at which pump 1 stops Low Level Set Point L Level at which pumps start www sweetwilliamsl com sweetwilliam ScadaMobile 2 3 Home Tab and Navigation Bar The Home Tab is where variables are displayed and where users can interact with their PLC values Like most i
56. a new array built by concatenating the two arrays together Example one two three four returns one two three four arr joinCstr Returns a string created by converting each element of arr into a string and concatenating them using stras a separator Example one two 3 4 joinC returns one two 3 4 arr fetch n d Returns the element at position n or returns d if n goes outside the array bounds n must be numeric value representing the element index Negative values of n count from the end of the array d can be any numeric string or array value Example one two three four fetchC none returns one Example one two three four fetch 4 none returns none arr Length Returns the number of elements in arr Example L one two Length results in 2 pag 56 101 www sweetwilliamsl com sweetwilliam ScadaMobile Time Date methods ee SYSTEM Description time timeformat The timeformatter method returns a string representation of an absolute time given a format string terCfmt When applying this method time is a numeric value meant to hold a specific point in time ex pressed in seconds relative to 1 Jan 1970 for example an absolute time value provided by the SMAbsoluteTime variable The fmt parameter is a format sting as specified in the Unicode Technical Standard 35 Appendix F The method will return a string representation of the
57. a numeric value 123 4 At index 2 we have an array of 2 elements with the number 33 and the variable temperature as their components Elements of the referred array can be accessed by index as shown next element at index 0 123 4 33 temperature 1 would return 123 4 L element at index 0 123 4 L 33 temperature 3 would return element at index Q element at index 0 123 4 L 33 temperature 1 0 would return 33 L element at index 0 123 4 L 33 temperature 2 1 would return the value of temperature pag 50 101 www sweetwilliamsl com weetwilliam ScadaMobile 3 1 11 2 Supported Operators and Operator precedence The following table shows the available operators and its precedence The table lists all operators from highest precedence to lowest O T ee EET Parentheses grouping from inner to outer o emeen OOO peee O ee Bitwise XOR Bitwise OR left to right Comparison operators not associative O ea Operators are used in the usual way as per the Ruby or C language Depending on data types involved the same operator may have a different meaning See Methods Expressions and more about Operators for further information pag 51 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 11 3 System Variables There are a number of system variables that can be used in expressions as if they would be regular tags The following vari ables are provided VARIABLE NAME TYPE Desc
58. are the same communication settings On the connections tab you can review active PLC connections and important information of your selected Source Files such as the IP and port of the PLC they are configured to connect to and eventual errors found while parsing Source Files To display information about a selected Source File including possible parsing errors just tap on it Additionally this is the place for setting Validation Codes for protocols supporting them suilmovistar S 19 38 movistar gt 19 38 amilmovistar S 14 26 movistar gt 14 26 Connections Connections Connections Source Info ColorfulControlsEIP PCCC csv Default Ethernet IP PCCC Parser Result OK ColorfulControlsEIP_PCCC csv gt Protocol AlarmsEIP_PCCC csv gt Ethernet IP PCCC String Encoding EIP_PCCC_Examples csv gt WindowsLatin1 Rate 3 73cps PLC Local IP 0 55s D 1 86 rps E 192 168 1 38 44818 default Validation Code sant PLC Remote Host 44818 default Connected to 192 168 1 38 44818 SSL Enabled Connections Connections Connections Tab Source File Information The chosen polling interval and actual polling behavior is also displayed on this tab The following data is presented Rate This is the selected Polling Interval on the Settings Tab or given on Source File s rps Represents the current number of complete read cycles performed per second On fast networks this should be around 1 R
59. ars and to access fields of digital and analog I O points The way you use ScadaMobile for accessing to these features is described in continuation DataTypes Supported types for Opto22 are DINT REAL and STRING Column B Other data types in ScadaMobile can be used as well but they may trim results depending on the actual values in the controller Tables Tables are fully supported Tables can be of DINTs REALs or STRINGs To access tables you define the number of elements to read or write from a table as an array subscript on Column B For example REAL 8 will refer to 8 elements of a ta ble of floats Similarly on column C you specify the starting element for example myRealTable 3 These two examples com bined on the same row will cause reads or writes of 8 values from the table myRealTable starting at element 3 and continuing through element 10 inclusive Digital and Analog I O Points I O points in Opto22 are represented by data structures which ScadaMobile can read and pro vide access to some of its members In order to access I O point structure members a dot notation using particular names is used The following member access names are available digital_I0_point state read access to a BOOL value corresponding to the actual state of any Digital I O point digital_I_point on_Latch read access to a BOOL with the On Latch attribute of a Digital Input point digital_I_point off_latch read access to a BOOL with the Off Latch attribute of a Digi
60. ate For example for a Rate of 0 5 seconds a rps of around 2 should be expected cps Represents the number of commands per second that are being sent to the PLC to meet the Rate requirement This will be always a multiple of rps A bigger multiple means that more commands must be sent per read cycle to complete the read This figure ultimately depends on what it being read at a particular time and the available tag optimizations for the protocol being used See Performance for an extensive discussion about tag optimizations Note that rps and cps display the current real time figures on the connections tab as they happen This means that on an iPhone or iPod since the main tab will be hidden at the same time what you will get at that time may not be representative of what you would have when you return to the main tab On an iPad since you can display connections and variables next to each other you are able to get more accurate figures pag 73 101 www sweetwilliamsl com sweetwilliam ScadaMobile 6 User Accounts User accounts allows to determine what process variables will be visible or editable for a particular use or user depending on particular variable attributes Relevant attributes for this purpose are access and write_access See Specification of Attributes Only users who have an access level equal to or greater than the one set for a particular variable will be able to view or edit it The purpose of user accounts
61. ated and dynamic on evaluation of the hidden expression Dynamic hiding is useful to switch among several rows that se lectively meet an arbitrary condition or to force display parts of the interface depend ing on user or PLC triggered conditions pag 29 101 www sweetwilliamsl com sweetwilliam ScadaMobile ac ee eee eee TAG ATTRIBUTES KIND MEANING expression type de pends on context These are expression attributes that combined with particular styles provide addi tional functionality Particularly they provide a way to dynamically set ranges on bars and sliders see below and to display dynamic picker lists based on array content style special Can contain one of the texts below for determining ways to represent or display the text value of a variable switch It is the default style for writable booleans It displays a boo lean variable using a Switch control The variable will change its state on each touch Will be ignored if the variable is not wri table segment_switch Displays an alternative to the switch style for writable boo leans button Presents a Push Button for writing of boolean values Contrary to the switch style the related process variable does not change permanently but it goes to 1 true on button press and goes to 0 false on button release Draws a bezel line around a text field for highlighting writable numeric values Note that it is only
62. ave spared tags that are used in expressions or your users make extensive use of the plotting feature this measure may not be as effective as you might expect or even unproductive because basically you may not always beat the already optimal set of commands that ScadaMobile would generate anyway e Tags used in alarms or used in expressions are permanently polled to guarantee interface consistency These tags are also candidates to automatic optimization and applied all the above techniques but since they are read more often they offer the best opportunity for integrators to optimize their project in an user noticeable way As said this is by far the best thing you can do to optimize your project The key is to have as few as possible tags tied to expressions and to keep them in contiguous PLC memory addresses specially with no intercalations of tags that are not used in expressions i e tags that are candidates to be stripped off from readings In other words keep the tags used in expressions or alarms as packed as possible in PLC memory and do not interlace them with the remaining tags f you use a lot of boolean tags consider boolean arrays on EIP Native or bit access on registers on other protocols Bit readings on registers are faster because you get several boolean values with a single register read Finally ScadaMobile communications are completely moved to secondary threads and executed asynchronously in order to minimize any impact
63. bute attached 10 09 17 15 36 to the tag mune me Weight Value went below 3 kg Alarms are tracked and listed on a separate table as shown in the Group 2 Fanny landscape screenshot next to this section When an alarm condi dest tion is triggered the tag label attribute is used to display the text on Group 2 Third alarm in group 2 did become active lf 15 35 the left which may refer to an alarm group and the comment at G 2 tribute contains the alarm message displayed on the right eae Second alarm in group 2 did become active a Alarms will remain on the list as long as they remain active or they have not been acknowledged Their current state will be shown by small icons next to the alarm text am O Bright Red Alarm Clock icon means active and not acknowledged i Dark Red Icon means active and acknowledged C Gray Clock Icon means inactive and not acknowledged For a scalar type variables such as INT or REAL the bounds attribute determines the exclusion range of the alarm condition In other words an alarm styled tag will be considered active if its current value is NOT in the specified range For example con sider the following style alarm bounds 0 100 The tag holding these attributes will be treated as an alarm which will become active when its value is below O or above 100 To support simple min or max condition alarms the special numeric values inf and inf can be used see Attribute Scope and
64. cadaMobile 3 1 11 1 Data types in Expressions Variables and Expressions in ScadaMobile support three basic data types Numbers Strings and Arrays Appropriate opera tors and methods allow for conversion among types and to perform custom operations with great flexibility See the following sections for a discussion on methods and operators Mixing Numbers Strings or Arrays is only possible through the use of the appropriate operators and methods that result in com patible types A direct consequence is for instance that you can not concatenate a number to a string unless you convert the number to a string first Also some operators have particular semantics depending on type just as most modern scripting lan guages including Ruby do See next sections for a further discussion on this an other subjects Numeric values Numeric values in expressions and variables are internally stored as Double Float values 64 bits Values read from PLCs in cluding BOOL and INT tags are scaled and converted to Double Float type before they are used in expressions All Arithmetic Logical and Comparison operations are performed as Double Float operations You may never expect to obtain truncated values from arithmetic calculations The above statement may change in the future to give support for true integer arithmetic Currently an implicit conversion to an integer type is only performed for bit or bitwise operations on numbers and indexed access to string
65. cal connections through WiFi security is given by the wireless network security protocol in use WPA and WPA2 with a strong password is the recommended security protocol For remote connections an iPhone or iPod touch is able to make use of secure data tunnels by enabling VPN If your router supports L2TP IPSEC or PPTP then you will be able to create this kind of connection Most medium to high end DSL or Cable routers support at least PPTP VPNs client connections are configured on the iPhone with the General Settings App Some routers can be loaded with a SSL certificate and be configured to bridge incoming SSL requests from the WAN to unen crypted TCP on the LAN side ScadaMobile supports TLS SSL encryption You can activate TLS SSL in ScadaMobile to provide communications confidentiality if your router supports SSL TCP bridging For most protocols ScadaMobile provides an independent way to protect users from undesired access by persons using uncon trolled ScadaMobile copies This is done by setting a Validation Code both in the PLCs and ScadaMobile which will prevent ScadaMobile to access PLCs unless both codes match Next section describes validation codes and how you can set them up Finally physical access can compromise security It is relatively easy for an unauthorized user to gather physical access to a device and run a remote monitoring application To fight this possibility ScadaMobile s user accounts provide password based security By
66. ce is polled at a given time Particularly tags that are not used in expressions and which values are not shown on the interface at a given time are not polled at all Therefore the less tags you link with expressions or use in expressions the better In fact having a large number of tags for the single purpose of showing their PLC value will not incur in any performance penalty because most of the time they will not be polled out from the PLC anyway If a particular PLC address needs to be read at a given time it will only be read once per polling cycle regardless of how many instances of tags tied to that address are found in the project Consequently you can repeat the same PLC tag address as many times as you need in your project without having to worry about any performance penalty The list of candidate tags to be read at a given time is applied a minimal cost algorithm to determine the less and shorter available communication frames for the relevant protocol which fulfill the entire request The optimal solution may include read ing unsolicited tags if this justify a better performance figure The simpler scenario is reading several almost contiguous tags with a small gap in between Reading all of them and then discarding the unused ones may be faster than only reading the so licited ones To help on this you can use tags as contiguous as possible and leave the shorter possible gaps between them however note that if you h
67. ces B gt v 03 01 12 14 18 2 5 KB pn Aphorism ONE csv FEI Documents 0 gt o 03 01 12 14 18 15 3 KB ColorfulControlsEIP_PCCC Files are stored under categories depending on 03 01 12 14 18 7 0 KB their function Tap on a row to view a list as well as additional options Y ColorfulControlsModbus csv 03 01 12 14 18 7 0 KB External Storage CommunicationsState csv TE 03 01 12 14 18 1 3 KB d iTunes gt DataTypes cxr 03 01 12 14 18 1 9 KB You can use external services such as iTunes file sharing to store files that may persist among all DataTypesModbus csv your iOS devices 03 01 12 14 18 2 1 KB DataTypesModbusES csv File Categories Source Files Document Files Document files are optional files that can be reviewed at any time or presented on demand for example based on PLC tag value Document files can be of any type see Document Files supported by ScadaMobile and they can be stored locally un der the Documents category External Documents residing on computers or web servers can also be displayed on demand based on user actions or PLC values See the viewer type attribute and the url attribute under tag attributes for further information pag 10 101 www sweetwilliamsl com sweetwilliam 3 1 Data Sources created in Excel ScadaMobile You can use an Excel or Open Office to compose a data source file for ScadaMobile The file must be exported or saved in CSV format NOTE CSV file f
68. connection setting 3 All available PLC connections are active and linked through the remo te_host connection setting or the default Remote connection setting This variable can be used to implement behavior dependent on local remote connections type For example you may want that for particular user accounts some interface elements or project features are not available when accessing from remote locations SMConnectedNetwork string For WiFi networks it will provide the BSSID of the wireless router the iOS de read only vice is connected This can be used to filter some interface elements or to perform special actions based on physical connection to particular WiFi spots Returned BSSID may look like this 0 24 36 a7 e6 9b SMCurrentPageName string Name of the currently displayed page read write pag 52 101 www sweetwilliamsl com sweetwilliam ScadaMobile VARIABLE NAME Description SMDate string Text representation of the current date and time in the following format read only yyyy MM dd HH mm ss SMAbsoLuteTime number Current absolute time Absolute time is measured in seconds relative to the read only absolute reference date of Jan 1 1970 00 00 00 GMT You can use this variable in combination with Time methods to obtain string representations or to get calendar parts as numeric values SMActiveALarmCount number Number of Current Active Alarms read only SMUnacknowLedgedA number Number of Alarms
69. d only tags its meaning depends on the particular style of the tag It is currently supported by the bar slider and alarm styles Example bounds 100 100 expression Indicates a color to apply to a variable value or control Colors can be specified by numeric name as listed in http Wwww wSschools com cssref css_colornames asp Colors can or string also be given by RGB value in hexadecimal format The color_bounds attribute de termines when the color will be applied Supported values also include TextDefault BarDefault and DefaultGreen which are the colors used by default on texts bars and boolean tags As Numeric Expression the color attribute expects a 32 bit integer value containing the RGB color coordinates in the three lower significance bytes with the B value in the least significant byte The method SM color can be used for convenience to gen erate a color from its RGB coordinates or by name Examples color red color olive color FF3300 Example color SM Color 127 127 127 color_bounds value list A two elements list in the form low high where low and high are numeric values de termining the range of values for the tag where the color will NOT be applied also Known as an exclusion range Examples color_bounds inf 50 This will exclude tag values below 50 from displaying in the color set in the color attribute Therefore tag values will be displayed in the speci fied color when
70. date and time for the given absolute time taking into account the current time zone location of the de vice For more information on valid format strings for the fmt parameter you can have a look at http unicode org reports tr35 tr35 6 html Date_ Format Patterns When looking at this spec be aware that character symbols in the format string are case sensitive and thus they may have different meaning depending on case for instance yy will represent a year whereas YY will represent a week of year Example SMAbsoLuteTime timeformatterC yyyy MM dd HH mm ss may return the string 2012 12 28 10 15 26 Returns the Gregorian Calendar year for an absolute time time at the current time zone location time month Returns the Gregorian Calendar month for an absolute time time at the current time zone location Range of returned values is 1 to 12 time day Returns the Gregorian Calendar day for an absolute time time at the current time zone location Range of returned values is 1 to 31 time wday Returns the day of the week for an absolute time time at the current time zone location O is Sun day 1 is Monday and 6 is Saturday time yday Returns the day of the year for an absolute time time at the current time zone location Range of returned values is 1 to 366 time week Returns the week of the year for an absolute time time at the current time zone location Range of returned values is 1 to 53 time hour Returns the Gregorian
71. e ES amp DAC Diaitz vut Modoo Choc NN ESE OBER EN A I Point State HR1 DINT ID 66 OxFO80 0000 LON Off Latch ON HR3 DINT ID 66 OxFO80 0004 On Latch HR6 DINT ID 66 OxF080 0008 DAC Bilalkt we kda kdl aTa D ENTS SH OE Point Status ON HR225 DINT ID 66 0xF080 01C0 Turn On HR225 DINT ID 74 0xF090 01C0 Turn Off HR227 DINT ID 74 0xF090 01C4 PAC Brains SNAP PAC EB1 SNAP PAC EB2 Energy Management Units OPTOEMU SNR 3V OPTOEMU SNR DR1 OPTOMEMU SNR DR2 Previous Generation HW SNAP ENET S64 SNAP UP1 M64 SNAP UP1 ADS SNAP UP1 D64 B3000 ENET ScadaMobile allows simultaneous connections using both drivers Information from both memory areas can be mixed in the same user interface and pages if required One such example is to access XVALs though MMP protocol using modbus tcp as the opto22 native protocol always ac cesses IVALs from the running control strategy pag 94 101 www sweetwilliamsl com sweetwilliam ScadaMobile CommunicationsState csv Uses the system communication state global variable and displays a row showing the current communications state pag 95 101 www sweetwilliamsl com sweetwilliam ScadaMobile Formula ONE csv Shows several aspects and possibilities of using expressions
72. e figure is displayed implies that the current user has an access level of 5 or above because a se lectable switch is available to change the process variable value instead of a static text see User Accounts pag 26 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 4 1 Attribute Scope and Kind Attributes by Scope Most attributes apply to a single Tag or Variable They are referred to as Tag Attributes Others have a global scope within a Source File and we refer to them as Global Attributes In the following sections all attributes are discussed individually Attributes by Kind Attributes can hold a Numeric Value a Text a Special Text or a List of Values depending on their meaning or purpose For some attributes Expressions which calculate values depending on other variable values can be specified Numeric Values are expressed as decimal numbers with optional decimal point and decimal digits if they have sense for the attribute Several special values are provided for convenience Particularly true equals to 1 0 false equals to 0 0 inf represents a very big negative number inf represents a very big positive number Numeric values are expressed directly after the equal sign without quotes including the convenience values Examples write_access 3 word_swap true Texts usually represent text labels or fields in the application interface They must be enclosed in quotes only if they conta
73. e rack and slot where the S7 controller is located Bits 0 4 of this at tribute value identify the slot number while bits 5 7 identify the rack Default value is O pag 39 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 5 Pages Sections Rows and Data Sources Page Section and Ord attributes The ScadaMobile interface for the iPhone and iPod Touch consists on a set of cells or rows representing PLC variable values which in turn are arranged in Pages containing Section headers for groups or rows Variables are optionally assigned a Section and a Page by attaching them the equally named attributes All Variables having ex actly the same Page name will belong and will be added to a page with such name Similarly the Section name attribute will be used to put all variables belonging to the same section under an epigraph with that name A single attribute the ord attribute is used to force Pages Sections and Rows to be placed in specific locations Pages and Sections are arranged according to their first appearance on the Source Files based on global order of all variables This is used to force sections and pages to appear in the desired place Variables without an order number will be considered to lay below or after ordered variables but they will maintain their relative position as found in the source file How it works First rows from all selected Data Source files are sorted from low to high using their ord att
74. earlier However ScadaMobile will recognize them as well Since RS Logix does not provide a convenient way to select a particular set of Tags before exporting you may need to edit the exported file with Excel or a Text Editor to adapt it to your needs In such case you do not need to change its overall structure and format just eliminate redundant rows and you will be done pag 66 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 4 Opto22 PAC Control as a data source generator ScadaMobile shares the same tag database as the rest of the Opto22 PAC Project suite The strategy database is created in PAC Control as part of normal project development 3 4 1 Build a project using PAC Control Create a new or open an existing control strategy If you are an Opto programmer you already know how to do it A description on how to program PAC hardware is beyond this manual You may need some help from an Opto 22 integrator or ask them to do all the steps for you 3 4 2 Export Controller Tags from PAC Control To produce a list of all variables and their tag names in a project use the View Print Database option under the Files menu tab of PAC Control This produces a Rich Text Format file that lists all of the variables in the strategy their tag names object type and size This information can be copied and used in ScadaMobile source files in the description columns Note that all tags are case sensitive When using the View Print
75. econds 1 minute 1 second the second row will display 01 01 01 Instead of using the join method we could have used the format function in a posibly more convenient way Consider the fo llowing value formatC 2d 02d 02d x 3600 Cx 3600 60 x 60 in this case the format specifiers in the format string are just replaced with the relevant time values Calculating seconds from a string having the hh mm ss format Just to illustrate what expressions allow to do let s try now to get the original seconds value from a string already in the hh mm ss format To do so we can use the following expression vaLue 3600 t splitC fetchC 3 0 to_1 60 t splitC fetchC 2 0 to_i t splitC fetchC 1 0 to_1 In this case we extract separately the hours minutes and seconds as numeric values from the string we multiply them by 3600 60 and 1 respectively and then sum them to get the total number of seconds The extraction of each value from the original string is performed by the split method using as delimiter The relevant element from the split array is obtained with the fetch method We use 0 as the default value for fetching Note that we could have used simple array indexing such as_t splitC 3 to get each part of the original string but this would lead to potential out of bound errors if the original string had some missing part Particularly if the original string did only contain minutes and seconds such as 50
76. eetwilliam ScadaMobile On EIP Native you can still use the dot notation to access individual bits on variables but due to strict type checking you must set the correct variable type on column B In order to force ScadaMobile to display such values as bools you can use the bool style With the Opto22 Native protocol the general rule works for reads and therefore you can follow a tag name in column C with a dot and bit number to obtain the corresponding bit value for example mylntTag 3 will return the value of bit 3 Note on EIP Native communications protocol AB Logix controllers EIP Native communications do not rely on particular memory locations or positions but on symbolic names With this protocol the user is relieved from the responsibility to assign memory addresses or registers and from the need to take tag sizes into ac count for storage Additionally EIP Native tags carry data information such as type and size which ScadaMobile uses to check against type mismatches on PLC returned values As a result it is not possible to store values that differ in type or size from the values that are uniquely defined in the PLC Any attempt to so so will result in a type mismatch error on the offending tag For EIP Native symbolic names any valid reference to an existing scalar or array type tag including structure members or array elements is allowed For example myStructData 2 3 intMember may refer to an integer value ref
77. er LOOKUP access 3 comment l will see this with my user level of 3 or more Multiple range lookup tables Lookup styled variables use the engineering unit as the index to the table Therefore you can use the scale attribute for PLC tags to make a lookup styled row to access to particular portions or ranges of the table For example scale 0 10 100 110 will forward any raw value coming from a PLC tag in the range from O to 10 to table text entries from 100 to 110 You can use this feature to effectively have several virtual tables simultaneously in use The StylesExampleModb example shows how this concept works Note however that since INTERNAL tags do not perform any value scaling the above technique will not work on them Instead you can use appropriate numerical expressions in the value attribute in order to fetch the desired range from the table Addi tionally the global lookup table is available to expressions with the SM Lookup method pag 41 101 www sweetwilliamsl com A lt We ctwittiam ScadaMobile 3 1 7 Alarms til movistar gt 16 02 Acknowledge Alarms An Alarm tag is a special kind of tag that is not displayed in the main tags table An alarm tag is characterized because its style OUP l Weight Value went above 6 kg attribute is set to alarm Alarm conditions can be specified with r Group 2 Second alarm in group 2 did become active the style attribute in combination with the bounds attri
78. er variable timer timer start_timer when written to sends the command StartTimer to the Timer timer timer stop_timer when written to sends the command StopTimer to the Timer timer timer pause_timer when written to sends the command PauseTimer to the Timer timer timer continue_timer when written to sends the command ContinueTimer to the Timer timer Charts It is possible to read Chart Status and to perform Start and Stop operations This is provided by means of structure member access names The Start and Stop commands work with writable rows The same recommendations given for Timer commands apply for Chart commands chart chart_status provides read access to the 32 bit BitStat value of Chart chart as a UDINT value chart start_chart when written to sends a Start command to the Chart chart chart stop_chart when written to sends a Stop command to the Chart chart All of these functions are demonstrated in the opto22pac csv example file preinstalled with the ScadaMobile which is based on the SNAP PAC Learning Center project files and can be used as a template for your project pag 21 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 3 1 Internal Tags Internal tags are stored and managed inside the ScadaMobile app Internal tags mostly behave as actual PLC tags except that they are not linked to an actual PLC address Thus internal tags do not require an active TCP connection to display a value In combination with expressions inter
79. eral ways and to use PLC values to present particular documents Documents can be stored either locally or retrieved on line from a web server Instructions on what to display an how to arrange or format information is given on Source Files All files in ScadaMobile are stored under Categories Files can be accessed or moved around with options available in the files tab Data Sources Source files are standard CSV or TXT files that contain relevant information for visualizing PLC process variables as required by users They are stored under the Sources Category ScadaMobile accepts CSV files created in Excel Open Office or a plain Text Editor For some PLC brands it partially supports as well files which are directly created from PLC vendor s development tools such as Omron s CX Programmer or Allen Bradley RSLogix One or several Sources can be selected to work with Variables from all of them will be presented depending on current user access level Selected working sources are signaled with a gear icon next to its file name Each source refers to a single PLC but several sources can refer to the same PLC All sources that point to the same PLC IP address are automatically joined into a single Connection and a single communication channel will be shared for them aull movistar 19 34 aull movistar 19 38 ng Files Files Sources Done _ i AlarmsEIP_PCCC csv o File Categories 03 01 12 14 18 2 6 KB AlarmsModbus csv PA Sour
80. erenced by the intMember member of element 2 3 of an array of structures Look at EIP_TAG_Examples csv template for more examples of how to specify tag names for Allen Bradley Logix controllers As a general rule any Tag name path referring to an existing scalar value BOOL SINT INT DINT REAL STRING or array of such elements in a Logix Controller can be accessed by ScadaMobile To access arrays as a whole you need to define an array size next to the type as discussed on the previous and following sec tions You can also access program tags by using the following syntax Program lt program_name gt lt tag_name gt Note that Program is literal lt orogram_name gt and lt tag_name gt identify just what they suggest Note also that ScadaMobile performs a Validation Code security check before any other attempt to access other tags is made therefore it is mandatory to have a tag named SMValidationCode of type INT in your PLC for communications to work see Validation Codes pag 20 101 www sweetwilliamsl com sweetwilliam ScadaMobile Note on Opto22 Native communications protocol Opto22 PAC The Opto22 Native is a symbolic communications protocol that uses PAC control symbolic tag names to access variables in Opto22 PAC controllers Integer Float and String data types and Tables are fully supported for read and write Additionally ScadaMobile provides ways to perform particular operations on timers and ch
81. etup using the recommended industrial wireless hardware but basically any WiFi router will do it RLXIB4 HN Industrial Hotspot ControlLogix __ 1756 ENBT Controller A Switch 4 pag 76 101 www sweetwilliamsl com sweetwilliam ScadaMobile 7 1 PLC Settings for local access In case of Omron s Fins TCP protocol use CX CJ1W ETN21 ETN21Mode Edit Parameters x Port for the PLC on the ethernet configuration panel FINS TCP Port NICP IP keep alive Default 9600 M Broadcast FINS UDP Pog FINS UDP Option Auto Destination IP is changed dynamically C 10BASE T Destination IP is Not changed dynamically ETN11 compatible mode 255 255 255 0 C IP address table FTP IP Address Table IP Router Table login 000 000 000 000 192 168 001 001 Password 000 Pot No 0o 0 Defaut 21 Transfer Unit to PC TransferfPCto Unt Compare sotsw Restat Set Defaults Cancelar For EIP Native protocol and Allen Bradley HB Module Properties Controller 1 1769 L32E Ethernet Port 15 3 controllers use RS Logix 5000 tool to set a fixed local IP for the PLC on the ethernet module properties panel IP Address 192 168 1 39 Domain Name PO Must Match IP Address Orr arenes rat Aoa Mane PO Subnet Mask 259 255 255 0 Select Port Speed fioo Mbps
82. g jpg gif The possibility of storing and viewing files can be useful to document specific con figurations or simply to move documents between computers Even if ScadaMobile was unable to display some kind of very uncommon file admin istrator users are still able to store any file types including those that are not sup ported for display Files stored under the Documents category can be targets of the viewer type attribute for rows in Source Files See tag attributes for further information pag 71 101 www sweetwilliamsl com sweetwilliam 4 3 Custom Company Logo ScadaMobile You can place a custom logo on top of the Home view when the list of pages are seen You do this by using the available op tions on the Web Page provided by the integrated Web Server On the left screenshot below an imaginary company logo is shown alongside the same screen with the default logo on the right iPod 14 20 Overview Valve Control Process Data Status Data Alarms Example Imaginary Company Logo pag 72 101 iPod 14 21 Overview Valve Control Process Data Status Data Alarms Example Default Logo www sweetwilliamsl com weetwilliam ScadaMobile 5 Connections and Connections Tab Connections represent links between ScadaMobile and PLCs Each Connection can have one or more associated Sources Several Sources are automatically grouped in a single Connection when they sh
83. g tag values This ap plies to all protocols but EIP Native and Opto22 Native Accessing a Register as a BOOL Generally it is possible to specify a BOOL type for a register or memory location even if it is not meant to hold a BOOL You can for example specify on a row that HR1 is a BOOL In such case ScadaMobile will use the appropriate control for that row If it is writable a switch control will be used and value of one 1 or zero 0 will be sent to the register depending on user interaction on the switch EIP Native does not allow a non BOOL PLC Tag to be treated as BOOL due to the strict type checking that this protocol encour ages You can use the style bool instead to force the same effect Siemens ISO_TCP enforces size identification along with memory area thus some restrictions apply for use of BOOL type on larger sizes In this case you can use the style bool to force presentation to a BOOL type when necessary The Opto22 Native protocol does not add type information to tags so you can use BOOL on Column B to display values as per the general rule Accessing individual bits in a Register Individual bits on registers can be accessed by using the BOOL type and by specifying a bit address using the dot or slash notation depending on protocol see table above When writing ScadaMobile will use the appropriate protocol command to avoid overwriting undesired bits on the register pag 19 101 www sweetwilliamsl com sw
84. he actual read write command used to access PAC Charts or Timers See Note on Opto22 Native Communication Protocol below and the included example files www sweetwilliamsl com Siemens ISO_TCP Siemens S7 sweetwilliam Area Prefixes E Inputs I same as E A Outputs Q Same asA M Internal Flags DBn DB Data block Valid Size Modifiers after Area Prefix X Any size or 1 bit size B byte 8 bits W word 16 bits D double word 32 bits ScadaMobile Tags are addressed by Area and Size in the usual way for S7 controllers Examples E2 3 accesses bit 3 of input address 2 12 3 same as above English notation MB14 accesses address 14 on the flags area as a 8 bit value MW14 accesses address 14 on the flags area as a 16 bits value MD14 accesses address 14 on the flags area as a 32 bits value DB2 DBW6 accesses address 6 on Data Block number 2 area as a 16 bits value DB4 DBX8 accesses address 8 on Data Block number 4 area Size depends on actual type specified type on none 1 bit size column B Accessing data types longer than one register For data types requiring more than one register or memory location the lower address in their range must be specified For ex ample a variable of type DINT addressed by HR100 will use HR100 and HR101 because 2 Modbus registers 16 bits are re quired to accommodate the complete variable 32 bits Integrators must be aware of it to avoid overlappin
85. he app goes to the background and every 30 seconds When setting Background process to ON you must consider some impact on battery life Tests performed on an iPod Touch 4th Generation running ScadaMobile in the background to read values of a PLC with a polling interval of 1 second revealed that battery drained by 50 after 24 hours of uninterrupted operation pag 84 101 www sweetwilliamsl com sweetwilliam ScadaMobile ll Performance ScadaMobile is designed to offer great performance and a satisfactory user experience with good interface responsiveness In tegrators do not usually need to take particular actions to improve performance The app carries out a series of optimizations on tags and PLC communications that in most cases are enough to relieve integrators from having to adopt particular actions or design patters Still understanding what optimizations ScadaMobile performs can be useful to find out why if ever a performance issue arose and what you can do to improve on it Performance matters tend to be a complex subject and extensive discussions can be made ultimately testing is the only way to have a trustable answer We will just enumerate some of the techniques used in ScadaMobile to maximize performance and will give some tips to help you getting the best of the app for your particular project ScadaMobile automatically performs the following optimizations e Only the minimum set of tags necessary to display the interfa
86. ht not need to know about how it works underneath However keeping the event driven nature of ScadaMobile in mind can help integrators to understand why and when PLC tags will be written or alarms will trigger as a con sequence of an user interaction or PLC Tag change that originated a cascade of change evenis Expressions containing Logical operators are no exception to the event driven design They will be fully executed even if a change occurs on the right side of the Logical operator For example the expression value conditionl amp amp condi tion2 will be always false if conditionl is false however it will execute anyway as a consequence of a change on con dition2 Although the expression result will not change it will remain false the engine will still send a change event to any referring expressions which could potentially cause other effects such as a PLC tag rewrite if the expression was linked to a PLC tag Expressions are not allowed to create circular or recursive references This means that a result of an expression can not be refitted to another expression that ultimately would send a change event to the originating expression This is not allowed at any level on the expressions execution chain For example the following row int value INT INTERNAL value int valuet1 is not valid because the int value tag creates a circular reference around the value expression pag 48 101 www sweetwilliamsl com sweetwilliam S
87. i cate PLC tag types that in some cases differ slightly from the PLC manufacturer way As a general rule you do not generally need to worry about which particular representation a particular PLC uses ScadaMobile handles it all automatically for you However not all PLCs share the same fields for representing a string For example Allen Bradley controller strings are fixed ca pacity and can hold up to 82 character bytes Siemens S7 controllers on the other hand require a size specification for strings For Allen Bradley Controllers you can simply use STRING to indicate a single string or STRING n to indicate an array of n strings The actual representation of a single string on the PLC consists on a UINT or UDINT field followed by a 82 bytes long buffer AB MICROLOGIX STRING REPRESENTATION STRING Length 2 bytes Characters fixed size 82 bytes AB LOGIX STRING REPRESENTATION STRING Length 4 bytes Characters fixed size 82 bytes The same criteria apply for Opto22 PAC controllers as they represent STRINGs with a variable length structure starting with a field containing a value for both size and length followed by the same number of raw characters after the length field OPTO22 STRING REPRESENTATION STRING Size and Length 4 bytes Characters variable size For Siemens S7 Controllers you must use STRING size where size is the total number of byte characters that the string can hold or STRING size n to indicate an arra
88. idation Tag If the default validation tag interferes with your project you can set a custom one with the validation_tag attribute When you use custom validation tags you must follow the following points e Be sure to have the same validation tag in all files sharing a single connection i e with identical communication settings oth erwise one or more files will appear as dissociated on the Connections view e If you explicitly set the validation_tag attribute to the default one you will still have to do the same in all your files sharing a connection e When you explicitly set a validation tag you will have to explicitly set a non zero value for the validation code as using O as validation code is explicitly forbidden in this case and doing so will always fail the validation check pag 83 101 www sweetwilliamsl com sweetwilliam ScadaMobile 10 Background Task Processing You can tell ScadaMobile to keep connections alive even when the device iPhone iPod is locked Additionally ScadaMobile supports running in the background during a finite period of time on multitasking enabled devices On the settings tab there are two switches that allow for enabling such options Keep connected Background process Tick e 4 Keep connected When ON ScadaMobile will keep any open connection and will continue polling PLCs for 10 minutes when the device goes to the locked state or the user closes the app or switches to ano
89. ile Settings for local PLC access 8 Network Settings for remote access 9 Security 9 1 Validation Codes 10 Background Task Processing II Performance I2 Examples Document Revision History pag 4 101 65 66 66 67 67 68 ScadaMobile 64 64 66 67 69 70 TI TI 72 73 74 76 77 78 79 8l 82 84 85 86 99 www sweetwilliamsl com sweetwilliam ScadaMobile General Aspects ScadaMobile is presented in a tabbed interface Every tab has its own role within the app and allows for different functions With ScadaMobile you can monitor data coming from various PLCs Generally you will use Settings File Server Files and Connections tabs during deploying stages The Home tab shows real time values of process variables in PLCs or calculated values It is the one you will use for normal monitoring ScadaMobile automatically goes to this tab on launch ScadaMobile uses the concept of Data Sources see Data Sources Documents and File Categories and Connections see Connections and Connections Tab to do its job Sources contain the definition of tags and variables and Connections repre sent links with PLCs A Source is always associated with a Connection but a single Connection can belong to several Sources ScadaMobile also supports user accounts with access levels that can limit the ability to perform certain operations I I S
90. in spaces or the semicolon character but it is advisable to do it always as a rule to maintain readability label Main Run Stop Switch suffix Attributes requiring a Special Text only accept particularly chosen or formed text strings Valid texts vary depending on the particular attribute style bezel format 4 2 Value lists are used in cases where a single numeric value is not enough to provide the information required by the attrib ute The general format is a list of numbers separated by commas and enclosed between and characters scale 0 360 0 100 bounds 0 100 color_bounds inf 50 Expressions are accepted in some attributes to provide extended functionality Expressions are discussed on a separate section of this manual hidden my_tag true II my_other_tag false value flow1 flow2 pag 27 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 4 2 Tag Attributes A Tag Attribute is applied to a Tag or Variable at the same row and it exclusively affects to that Tag All attributes are optional and can be specified in any order The following attributes are supported TAG ATTRIBUTES KIND MEANING page text Text indicating which page the variable belongs to Text values must be written be tween quotation marks for example page FIRST PAGE text Text indicating which section the variable belongs to Text values must be writ
91. iption support support support Binary integer YES YES YES ee eae ee semen eee e Oo emm e l e l e o few e e e 5 eem se ee For the meaning and possible contents of the optional flags width and precision fields refer to the sprintf specification http Awww cplusplus com reference clibrary cstdio sprintt Note that since there is no need for it the ength field is not available neither in Ruby or ScadaMobile pag 60 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 11 6 The if then else clause and the ternary conditional operator Two forms of conditional execution are provided 1 The ternary conditional operator provide conditional execution of expressions Its syntax is the following expr expr1 expr2 Returns expr if expris not zero true or expr2 otherwise 2 The if then else clause provide conditional choice of expressions It is used as follows if expr then expr1 else expr2 Lend Executes expr1 if expris not zero true If expris zero false expr2 is executed instead Items between brakets are optional The if then else clause 2 differs from the ternary conditional operator 1 in the following ways e 1 executes when any of expr expr1 expr2 generate a change event The result is always updated and will be consistent with the values of expr expr and expr2 at all times The execution will in turn trigger relevant change events up the expres sions tree just as any expression wou
92. is to make possible that a PLC programs developer or integrator would create a pre configured solution for a particular final customer A final customer does not usually need to change communication settings or to modify attributes This is normally a developer s responsibility Therefore by setting user accounts and leaving the administrator password private a developer can choose to provide customized safe access to a process being monitored User accounts can also help to prevent non authorized persons from interacting with remote processes by getting physical ac cess to an iPhone with ScadaMobile installed Two accounts are set up by default with the following names passwords and access levels administrator nobody The administrator account lets you create additional accounts with intermediate access levels as well as to select active ac counts It is strongly recommended that you change the default passwords once you have a running configuration in place Note that there is no way to retrieve a lost password The only way to recreate the original passwords is by removing ScadaMobile from your iPhone and iTunes and reinstalling from the App Store If you ever need to do so be sure your Source Files are conven iently backed up Restrictions for Non Administrator users Only the administrator account has full access to all the application Non administrator accounts have restricted access to de ployment features
93. k up a text string from a previously entered list based on current variable value and display said text instead of the tag value To have a Row display a look up text instead of the usual value use the style attribute with lookup or picker as value style lookup style picker If you want to show the lockup text alone with no label and centered as shown in the StylesExampleModb example you can set the tag label to an empty text label The actual table is given in additional rows in the CSV file by using special tags of type LOOKUP in column B and by specify ing the related indexes in column C The text written on column D or a comment attribute on the same row will be the Lookup Text The following table is an example of what you would need to write for creating a two entry table with indexes 1 and 2 LOOKUP This is look up table at index 1 entry2 LOOKUP This is the second entry in the table so it will show if a lookup tag value is 2 Lookup indexes on Column C do not need to be ordered or contiguous they can be any number that fits in 16 bits 0 to 65535 Multiple user lookup tables You can specify an access level for entries in column D In such case you must set the lookup text in the comment attribute This allows for having different texts depending on user level For example consider the following entry1_boss LOOKUP oo access 9 comment Only me will see this message I m the boss entry1_work
94. l be converted automatically to UTF 8 regardless of the encoding specified on the source file The UTF 8 encoding is a multibyte character encoding derived from UTF 16 Like UTF 16 it can represent every character of all languages but unlike UTF 16 it is backward compatible with ASCII using only one byte for representing ASCII char acters pag 45 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 10 3 Use of International Characters in PLC Strings You can store international Strings in PLCs with ScadaMobile just as easily as you do with ASCII strings ScadaMobile will use the source file encoding identification to decode encode strings onto raw bytes in the PLC When storing international Strings into PLCs you must expect the number of bytes used and thus the PLC string length to be larger than the number of characters the string actually holds This is particularly notorious when storing Chinese or Japanese strings in PLCs The UTF 8 encoding for instance can use up to 6 bytes per character in a PLC However this does not affect how strings are allocated in ScadaMobile or the behavior of String methods and operators in expressions since these always refer to actual characters and actual character lengths regardless of encoding Of couse if you only use English or ASCII characters with an encoding that is backward compatible with ASCII or you use the Latini encoding only one byte per character will be allocated in your
95. l protocols so it is recommended for integrators and advanced users to use it on new projects and to set a plan to edit existing source files to conform with it Since version 2 1 you must explicitly indicate protocols eip native and siemens iso_tcp pag 43 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 10 International Languages Support and String Encodings The ScadaMobile iOS app includes localizations for English and Spanish for its user interface interface However International Characters and Strings in any language are fully supported Integrators can therefore chose to present their project interface in any language To represent strings the concept of String Encodings is used String Encodings are international conventions that determine how characters representing particular languages are stored into files and device memory 3 1 10 1 English and Western European Languages By default ScadaMobile assumes source files and Strings to conform to the Windows Latin1 encoding This is adequate for English and most Western European languages such as German French Spanish Portuguese and many others It does not require any particular setting English and Western European versions of Excel on Windows also use the Latin1 encoding for CSV files On Apple Mac computers you must save your CSVs as csv windows format to conform to this encoding The Latini encoding is backward compatible with old plain ASCII meaning that ASC
96. larms Wot 7 562 kg Bar Style Weight 7 562 kg eS Slide to trigger alarms 7562 g Writable Value Change value to trigger alarms 7 562 kg lalta Alarm 1 Acknowledge Alarms Group 1 Weight Value went i above 6 kg Group 2 Second alarm in group 2 did become active Group 1 Weight Value went below 3 kg o D www sweetwilliamsl com We csenitiamn TABLE OF CONTENTS General Aspects I I Supported protocols 2 User Interface Elements 2 1 Tabbed interface 2 2 Variables in ScadaMobile 2 3 Home Tab and Navigation Bar 2 4 Bottom Panel 3 Data Sources Documents and File Categories 3 1 pag 3 101 Data Sources created in Excel 3 1 1 Specification of Variable Names column A 3 1 1 1 Tag Scope 3 1 2 Specification of Variable Types column B 3 1 2 1 Representation of Character Strings in PLCs 3 1 3 Specification of Variable Addresses column C 3 1 3 1 Internal Tags 3 1 3 2 PLC Memory Arrays and Access Patterns 3 1 4 Specification of Attributes column D 3 1 4 1 Attribute Scope and Kind 3 1 4 2 Tag Attributes 3 1 4 3 Global Attributes 3 1 5 Pages Sections Rows and Data Sources 3 1 6 Look up Tables 3 1 7 Alarms 3 1 8 Comments in Data Sources 3 1 9 Specification of Communication Protocol 3 1 10 International Languages Support and String Encodings 3 1 10 1 English and Western European Languages 3 1 10 2 String Encoding for International Languages 3 1 10
97. ld do e 2 only attends to expr change events Any changes in expr7 or expr2 will not have an effect until expr executes Furthermo re if expris false and expr2 was not specified the execution tree is trimmed at this stage and no further execution up the ex presion tree will happen 2 is useful in cases where you want to achieve a differential effect for example to trigger an event when a condition goes from false to true but not the oposite This is not possible with 1 because it will always execute both ways Consider the following start BOOL INTERNAL label Start Button style Button write_access 0 stop BOOL INTERNAL label Stop Button style Button write_access 0 motor BOOL C1 label Motor State value if start then 1 else if stop then 0 The previous lines will display a Start tand a Stop button When the Start button is touched 1 will be written to C1 When the stop button is touched 0 will be written to C1 Another use of the if then else clause is the implementation of a counter reset BOOL INTERNAL label Reset Button style Button write_access 0 increment BOOL INTERNAL label Tick Button style Button write_access 0 counter DINT HR1 label Counter value if reset then 0 else if increment then counter 1 The Reset and Tick buttons will provide in this case the interface for a counter value written to the PLC Now consider the following case color1 UDINT INTERNAL label
98. le or web site to be presented is given as a string expression on the url attribute Player tags will play an audio file or iPod library asset when their associated tag value transitions from false to true The particular file or iPod asset to be played is given as a string ex pression on the url attribute Only unencrypted no FairPlay en coded iPod assets will be played pag 32 101 www sweetwilliamsl com sweetwilliam ScadaMobile snr rr TAG ATTRIBUTES KIND MEANING value list A four elements list in the form x1 x2 y1 y2 where x1 x2 represent a pair of numeric values in raw units as present in the PLC and y1 y2 represent the same values in engineering units as will be displayed on ScadaMobile By setting this tag attribute raw values are converted scaled to engineering values on display by applying a lin ear transformation This attribute can be specified in any read only or writable PLC tag See also the value attribute for a discussion on the particular support of this attribute on INTERNAL tags Example scale 0 100 0 1 value list A two elements list in the form min max where min and max are numeric values used to indicate a range expressed in engineering units This attribute can have sev eral meanings depending on other attributes particularly the style and the write_ac cess attributes On writable tags it determines and limits the available range of values that users will be able to enter On rea
99. les too so inte grators and advanced users can edit them with any text editor such as WordPad or NotePad at their convenience and save them in plain text format The creation of either CSV or TXT files from scratch in a text editor is also a possibility A consideration that must be made if you chose to use a text editor to create or to edit Source Files is that you must be aware of the Double Quoting that Excel applies to text columns containing quotes in it So you will need to add them manually where necessary This is not anything particular to ScadaMobile it is just how CSVs are Double Quoting is particularly relevant for column D of a ScadaMobile Source File because many attributes expect a text string as their value which may be enclosed in quotes When entering attributes in Excel you do not need to take any special care on this However the same file edited in NotePad will reveal the existence of extra quoting that Excel automatically inserts to avoid text conflicts an meet the CSV spec As an example assuming the tag name was main_switch in an Allen Bradley controller the row referred in section 3 1 4 would look this way on a text editor main_switch BOOL main_switch ord 1 section GENERAL label Main Run Stop Switch comment Main Process Start Stop access 3 write_access 5 If you chose to create and edit your files only using a text editor the recommended way is to emulate the TAB SEPARATED CSV fo
100. lliamsl com sweetwilliam ScadaMobile a A TAG ATTRIBUTES KIND MEANING expression Specifies a value to write on the related tag based on the result of an expression see Expressions Note that the value attribute has a slightly different behavior for Internal tags than for regular PLC tags For PLC tags the result of the expression is first written to the PLC already con verted to the relevant type and appropriately limited and descaled according to the pounds and scale attributes On reading the tag value is scaled back to the en gineering unit AS a consequence a tag may end having a slightly different value after that For example a Tag of type INT having scale 0 10 0 1 will become 1 2 when assigning 1 234 to it through a value change Due to the scaling and type conversion process the value in the PLC will be 12 On PLC writes involving STRINGS implicit conversions will also be performed if possible For example the STRING 2 3 will be converted to the number 2 3 upon writing a REAL tag Similarly the number 2 3 will result to the sequence of charac ters 2 3 when writing to a STRING tag For INTERNAL tags no type or scale conversion is performed on the result of the value expressions Internal tags are just given the result of the expression as it evaluates Thus the scale and bounds attributes will have no effect Even the tag type is ignored to the effects of the assignment and the related
101. lly mean an array of 20 character bytes however in this case it will be treated as a single string with a capacity of 20 bytes Keep in mind that if you use a string encoding other that the default you must expect the string to have a capacity of less than size characters This is because on some encodings a single character may require multiple bytes to be represented It is possible to have arrays of char strings For example CHAR size n will represent an array of n strings with a capacity of size bytes each See also section Representation of Character Strings in PLCs below This is a special purpose type used to create a text entry on a table which is referred to by variables having the lookup style attribute Rows with the LOOKUP data type on column B are just lookup data table entries and do not have any role on communications or add additional rows on screen See also Lookup Table When specifying the tag type you can optionally define an array size for it as shown above in italics When you do so the related variable will hold an array of values of the relevant type instead of a single value See Memory Arrays for more in formation Size definition is obligatory for CHAR types pag 14 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 2 1 Representation of Character Strings in PLCs Strings in PLCs are stored in several ways depending on PLC brand or family ScadaMobile uses a homogeneous way to ind
102. lowing a dot anda number from 0 to 15 For example W10 5 refers to bit 5 of W10 www sweetwilliamsl com sweetwilliam ScadaMobile PROTOCOL Melsec TCP Modbus TCP Modbus over TCP Opto22 Native Opto22 PAC pag 18 101 AREA PREFIX or TAG D Data Register word R File Register word TN Timer Current Value word TS Timer Contact bit CN Counter Current Value word CS Counter Contact bit X Input bit Y Output bit M Internal Relay bit S State Relay bit I Input Discrete read only C Coil IR Input Register read only HR Holding Register lt symbolic name gt Access by name REMARKS Bits or Words are specified by appending the number address to the device area For example M4 is bit 4 of M area D8 is word 8 of D area Individual bits on 16 bit device areas can be accessed by appending a dot and a number from 0 to 15 For example D8 5 refers to bit 5 of D8 To access Coil number 10 specify C10 To access Holding register 1 specify HR1 Individual bits in HRs can be accessed for reading or writing using a dot notation For example HR1 3 would refer to bit 3 in HR1 Actual symbolic PAC control tag name for accessing Strategy Variables Timers Tables i O and Charts In some cases suffixes or element specifiers are applied to identify variable attributes and special functions Data type and array index provided in column B are also relevant for t
103. ment over different versions Version 2 2 7 e Added aux0 and aux7 attribute descriptions e Updated the style bar slider and the style lookup picker attribute descriptions e Added description of new system variable SMConnectedNetwork Added description of new system method SM devicelD Version 2 2 6 e Updated section data types to take into account absolute time values e Added subsection Time Date methods e Added description of new system variable 6SMAbsolute Time Version 2 2 5 e Added references and information to Opto22 Native support where needed e Updated information on STRING representations including Opto22 kind Version 2 1 3 e Updated most screenshots to the current app user interface e Updated CHAR type description e Added description of new attributes type viewer type player and url e Updated description of the color attribute e Added new attribute polling_interval ScadaMobile e Added new System Variables 6SMPulse1s SMActiveAlarmCount 6SMUnacknowledgedAlarmCount SMCurrentUs erName and SMCurrentUserAccessLevel e Rewritten Section Connections and Connections Tab e Updated Section Background Task Processing Version 2 1 0 e Replaced occurrences of Tag by Variable where referring to SM Variables as opposed to PLC tags e Added section Representation of Character Strings in PLCs
104. mode ord 3030 section VALVE 1 label Man Auto comment H1 00 Bit 0 5 11 CF114 KEEP 011 Keep Run_Stop Pump_1_mode ord 4030 section PUMP 1 label Man Auto comment H1 01 Bit 0 6 14 CF114 KEEP 011 Keep Run_Stop Valve_2_mode ord 5030 section VALVE 2 label Man Auto comment H2 00 Bit w20 00 IK r pag 64 101 www sweetwilliamsl com sweetwilliam 3 2 2 Generate a Source File with variables from CX programmer ScadaMobile 1 In CX Programmer select the symbols that you want to monitor in ScadaMobile Optionally add display attributes for Scada Mobile in the comments column This is equivalent to filling column D on an Excel generated Source See Specification of at tributes Max_Level REAL D10 Work ord 2010 section WATER TANK label High Level Set Point L comment Level at which pump Mid_Level REAL D8 Work ord 2020 section WATER TANK label Mid Level Set Point L comment Level at which pump Min_Level REAL D6 Work ord 2030 section WATER TANK label Low Level Set Point L comment Level at which pumps Valve_1_open BOOL W21 00 Work ord 3000 section VALVE 1 label Open comment Valve 1 Completelly Open access 3 ord 3010 section VALVE 1 Valve_1_failed BOOL W21 02 ord 3020 section VALVE 1 label Failed comment Valve 1 Fail state access 3 Valve_1_cosed BOOL W21 01 Work
105. n number boolean number boolean str_byte_swap The combined effect swap attributes is as follows MEANING ScadaMobile will use Modbus RTU over TCP instead of Modbus TCP This will allow for accessing serial modbus RTU devices behind an Ethernet to serial gate way not supporting MBAP Use the slave_id attibute on tags to route commands to the right modbus slave node Swaps words for 32 bit data such as DINT or REAL before sending to or upon re ceiving from a modbus device Non zero values are true Default value is false Swaps bytes for 16 or 32 bit data before sending or upon receiving from a modbus device Non zero values are true Default value is false Swaps bytes for string data before sending or upon receiving from a modbus device Non zero values are true Default value is false Assuming a default of ABCD for byte order where A is the Most Significative Byte MSB and D is the the Less Significa tive Byte LSB you can combine word_swap and byte_swap with the following results 1 word_swap false byte_swap false will give ABCD for 32 bit values and AB for 16 bit values 2 word_swap false byte_swap true will give BADC for 32 bit values and BA for 16 bit values 3 word_swap true byte_swap false will give CDAB for 32 bit values and AB for 16 bit values 4 word_swap true byte_swap true will give DCBA for 32 bit values and
106. nal tags are a powerful feature that allows for presenting calculated values to the user or holding intermediate values for subsequent use Internal tags support most of the available attributes except the ones specifically targeted at PLC tags such as the scale attrib ute To specify that a Tag is internal use the word INTERNAL instead of a PLC address or Symbolic Tag INTERNAL Indicates that this tag does not have a link to an actual PLC tag Instead it exists only in the app Internal tags can be used to store and represent intermediate values or expression results Just as regular PLC tags internal tags can be associated to Local or Global scope variables To identify a variable associated to an Internal tag to have a Global scope just prefix it with a sign pag 22 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 3 2 PLC Memory Arrays and Access Patterns It is possible to read or write consecutive memory locations in the PLC as memory arrays and store them on a single variable In order to do so you define the array size next to the specification of variable type Column B ScadaMobile will read the specified number of values and will store them in the relevant variable as an array By subsequently using array expressions you are able to reach the individual array elements when required To deal with PLC arrays ScadaMobile uses several access patterns depending on specified type and actual size of data in the
107. ngle element Example 08 04 2014 spLitC returns 08 4 2014 Example 8 04 2014 splitC returns 0 8 0 4a yay Onn 4 Example 08 04 2014 spLit returns 08 4 2014 str lLength Returns the number of characters in str Example HeLLo Length returns 5 pag 55 101 www sweetwilliamsl com sweetwilliam ScadaMobile Array operators and methods ARRAY Description Embeds the elements d1 d2 and so on in an array and returns it Array elements can be numbers strings or other arrays Example the following expression 1 two 10 eleven would create an array containing three elements the array will have a number at position O a string at position 1 and a two ele ments array at position 2 arr n Get element at index n from arr If n is negative indexes start at the last character Generates an error when attempting an on out of bounds access Example one two three four 1 returns two Example one two three four 1 returns four arr Ln m Subarray Returns a subarray of arr starting at n and continuing for m elements Always returns an array It will return an empty array when access is beyond limits m can not be negative Example one two three four 2 returns one two Example L one two three four 3 1 returns two Example one two three four 2 2 returns three four arr arr1 Returns
108. nication Protocol This comment may look something like this protocol eip native For protocols based on registers or memory locations Variable Addresses are specified by a prefix referring to the appropriate memory area followed by a numeric value indicating the position in that area Allen Bradley s Ethernet IP for Logix Controllers is based on symbolic names Write PLC Tag symbolic names in Column C The following memory areas and prefixes are supported EIP Native AB Logix Controllers lt symbolic name gt Access by name Actual symbolic PLC tag name See Note on EIP Native Communication Protocol below EIP PCCC AB Micrologix and SLC 5 O0 Outputs 11 Inputs Tags are specified by File type File number and Offset in the regular way Individual bits in words can be ac cessed to using the usual slash notation for SCL and Fins TCP Omron pag 17 101 S2 Status B3 Binary T4 Timer C5 Counter R6 Control Nn Integer File n is file number Fn Floating Point File n is file number STn String File n is file number W Work area D Data Memory Area DM T Tim Counter Area T C H Holding Register Area HR A System Area AR Area E Extra Memory EM Area no prefix I O Area Micrologix controllers Examples B3 5 would access word 5 on file 3 of type B N7 0 would access value at position 0 in N7 File N7 0 3 would access bit 3 in N7 0 Individual bits are specified by fol
109. nors a WBA Googie D Fi order to recover full original state l es Load Templates Embedded Web Server File Download ScadaMobile gt PC Click or Right Click on a file name in the list to download it to your computer Click Delete to remove a file from your iPhone Web Server CK SS nr DataTypes cxr 1 9KB 3 9 10 11 16 PM Delete http 1 92 1 68 1 1 06 8080 DataTypesModbus csv 2 1 KB 3 9 10 11 16 PM Delete s Bonjour Joan s iPhone DataTypesModbusES csv 2 1 KB 3 9 10 11 16 PM Delete DataTypesModbusWSource csv 2 6 KB 3 9 10 11 16 PM Delete DataTypesModbusWSourceES csv 2 6 KB 3 9 10 11 16 PM Delete To move files between ScadaMobile and a PC EIP_TAG Examples csv 13KB 3 9 10 11 16 PM Delete switch on the server and point your Web Browser EIP_TAG_ExamplesES csv 1 3 KB 3 9 10 11 16 PM Delete to the IP address that will appear just below a cae SOIG EM Dejar Bonjour technology is supported for Safari FillATankWSource cxr 7 4 KB 3 9 10 11 16 PM Delete PagesExampleEIP csv 5 9 KB 3 9 10 11 16 PM Delete browser PagesExampleEIPES csv 5 9 KB 3 9 10 11 16 PM Delete PagesExampleModbus csv 5 9 KB 3 9 10 11 16 PM Delete PagesExampleModbusES csv 5 9 KB 3 9 10 11 16 PM Delete QuickinOut csv 1 7 KB 3 9 10 11 16 PM Delete QuickinOutES csv 1 7 KB 3 9 10 11 16 PM Delete StylesExampleModb csv 6 3 KB 3 9 10 11 16 PM Delete File Upload PC gt ScadaMobile Click on the button below and chose a file from your PC to transfer it t
110. nvert from rectangular x y to polar r coordinates that will satisfy x r Math cos and y r Math sin In general conversions to polar coordinates are computed in this way r Math sqrt x x y y Math atan2 y x Computes the cosine of x measured in radians Calculates an exponential function e raised to the power of x Calculates the natural logarithm of x Calculates the base 10 logarithm of x Computes the sine of x measured in radians Computes the non negative square root of x Computes the tangent of x measured in radians Returns the n constant number www sweetwilliamsl com ScadaMobile weetwilliam ScadaMobile 3 1 11 5 The format specifiers and the format function The built in function format returns a string formatted according to a format string like the usual printf conventions of the C lan guage In addition format accepts b for binary ScadaMobile format specifiers adopt the following form lt flags gt lt width gt lt precision gt specifier Where specifier is the most significant one and defines the type and the interpretation of the value of the corresponding argu ment lt and gt denote optional fields Note that the string provided for the format tag attribute or the format string passed to the to_s method have a slightly different purpose and may have less available options The following format conversion specifiers are available SPECIFIER Descr
111. o your iPhone or iPod touch If you need to commit changes on the file you just uploaded use the Re submit File button after saving in Excel Re submit File FT Embedded Web Server Embedded Web Page as displayed by Firefox Browser NOTE In order to have access to files you must log into the administrator account The initial password is admin ScadaMobile sets itself to this account on first launch See User Accounts pag 70 101 www sweetwilliamsl com A lt gt We otwilliam ScadaMobile 4 1 Source Files supported by ScadaMobile ScadaMobile supports the following Source File formats V csv generated by Excel or Open Office V txt any text file with tab comma or semicolon field delimiters generated by Excel OpenOffice NotePad etc V csv generated by RS Logix V cxr generated by Omron s CX Programmer tool NOTE The recommended way to generate source files is to begin with one of the provided examples and then continue by editing what is missing 4 2 Document Files supported by ScadaMobile In addition to Source Files ScadaMobile is able to store and display a number of ad ditional file formats The following file types with no aim to be exhaustive are sup ported for display V Excel xls Carrier gt 10 02 PM n V PDF pdf TE ScadaMobile ONE pat X V Powerpoint ppt V Word Pages documents doc pages V Rich Text Format rtf V Image files pn
112. ome View use a scroll down gesture when you are at the top of the table To switch from one page to another use a scroll left or scroll right gesture on the page title Alternatively tap on the right or left sides of the Page Control next to the dots on the Navigation Bar To show or to hide the Page Control on the Navigation Bar use the Paging Enabled option on the Settings tab To navigate to the list of pages tap on the Navigation Bar left button To see alarms or trend graphs tap on the Navigation Bar right button pag 8 101 www sweetwilliamsl com sweetwilliam ScadaMobile 2 4 Bottom Panel By tapping on the right button on the home view Navigation Bar the bottom panel will appear The various user interface elements in it will allow you to view and acknowledge alarms as well as create any number of trend graphs with any number of plots in them Just scroll the bottom panel left and right to move to different pages on it The page control on the bottom also provides a way to switch among bottom panel pages Scaling Formating l Wgt 1 940 kg Scaled and Formated Value Bar Style Weight 1 940 kg Slider Style 1940 g EEE Format in Writable Value 1 940 kg Writable value with bezel and format Bottom Panel pag 9 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 Data Sources Documents and File Categories ScadaMobile is able to display information from PLCs in sev
113. on 192 168 1 40 Auto dynamic Auto Destination IP is changed dynamically Auto Static 10BASE T Destination IP is Not changed dynamically p Subnet Mask Combined ETN11 compatible mode 255 255 255 0 IP address table FTP m IP Address Table aa Login 000 000 000 000 192 168 001 001 Password ns Pot No o Del 0 Default 21 TransferUnitto PC TransferiPCto Unit Compare Sotsw Restat Set Defaults Cancelar pag 79 101 www sweetwilliamsl com on the Channel Configuration panel sweetwilliam ScadaMobile For EIP Native protocol and Allen Bradley E Module Properties Controller 1 1769 L32E Ethernet Port 15 3 controllers use RS Logix tool to set the fixed local router IP gateway on the eth ernet module properties panel IP Address 192 168 1 39 Domain Name For EIP PCCC protocol use Allen Bradley s Must Match IP Address on General Tab Host Name RS Logix 500 tool and set the gateway IP Subnet Mask 255 255 255 0 Select Port Speed 100 Mbps l Gateway Adde 192 168 1 1 Curent Port Speed 100 Mbps Primary DNS D ma n TT Server Address Select Duplex Full Duplex yo oe l eple rei 0 0 0 0 Current Duplex Full Duplex i Changes to Port Speed and Enable Bootp Duplex require module reset l Enable DHCP DHCP must be configured to return a fixed address V Enable DNS F Auto Negotiate Port Speed and
114. on attributes The example is self contained by using only INTER NAL tags and it does not need an actual PLC connection to run It is structured in pages and fully commented to demonstrate Switching and displaying hiding of rows on the interface based on user selectable style Use of the picker attribute to allow users to retrieve a value based on a picker wheel control Complete or partial removal of rows sections and pages based on simple boolean states Arithmetic and boolean calculations based on tag values Implementation of controls to enable disable particular alarms Use of the File Viewer and Audio Player features Use of system variables in expressions to achieve special effects a movistar gt 16 16 al Product Selection O movistar 16 21 g 7 VIS a O S 42616 g St ee ee M u e Ml _ _ Show Hide Product 0 wee ee ee ee 90000 BOOL Switched to Winter Period Show Hide Product 1 HIDE SHOW 00000 BOOL HIDE SHOW Someone Started the Engine Show Hide Product 2 Human presence detected in the 00000 BOOL restricted area Show Hide Product 3 HIDE SHOW PE 00000 BOOL HIDE SHOW Boiler pressure is above limits Show Hide Product 4 7 00000 BOOL Show Hide Product 5 HIDE SHOW a sae HIDE SHOW Third Choice Show Hide Product 6 00000 BOOL Show Hide Product 7 00000 BOOL Show Hide Product 8 00000 BOOL pag 96
115. ond boiler pressuse is above limits a ercieie s tele e 34 Net Nan et ete ne te Nee te Fe ee Lookup Value group 1 0 Enter value to change first text above Lookup Value group 1 4 Enter value to change second text Lookup Value group 2 3 Enter value to change third text above Lookup Value group 2 5 Enter value to change forth text above e AF a Tipies osea ACI This example shows the available styles and some related tag attributes such as scale format bounds prefix suffix as well as the use of lookup tables using EIP PCCC protocol and will run on a AB Micrologix Controller pag 90 101 www sweetwilliamsl com sweetwilliam AlarmsModbus csv ScadaMobile Demonstrates Alarms management on a Modbus configuration The example includes both alarms based on tag value and dis crete alarms The following screenshots show alarming in the application left picture and an alarm notification from ScadaMo bile while running in the background which happened while browsing the internet in Safari wall movistar 15 38 4 Alarms Example gt eet ee alarms ee e ae i e eee Meee e e e Weight Value Linked to several alarms Wot 7 562 kg Bar Style Weight 7 562 kg Slide to trigger alarms 7562 g EEE Writable Value Change value to trigger alarms 7 562 kg a e Oe Oe a Alarm 1 ON Acknowledge Alarms
116. or array elements In other cases you can use the to_i method to explicitly get the integral part of a numeric value according to your needs Constant numbers can be represented with optional decimal point and a base 10 exponent Additionally hexadecimal and bi nary notations are supported by using the Ox or Ob prefixes The special forms true false inf and inf are supported as well Examples 1 42 decimal representation 1 1666e 2 decimal representation with exponent OxeOaf hexadecimal representation 0b011011101 binary representation true same as 1 false same as 0 inf very big negative number inf very big positive number Absolute Time values Absolute Times are just regular Numeric values with a special meaning An Absolute time is measured in seconds relative to the absolute reference date of January 1 1970 00 00 00 GMT A positive value represents a date after the reference date a negative value represents a date before it For example the Absolute Time 1 000 000 000 seconds translates into the calendar time 9 September 2001 01 46 40 GMT A Specific variable SMAbsoluteTime is provided to obtain the current time Specific methods are also provided to extract inter esting calendar fields from an Absolute Time value as well as to get custom string representations of calendar dates Examples SMAbsoluteTime may return 1355481788 seconds count since the reference date SMAbsoLuteTime year may return 2013
117. or color Values from 20 to 20 will be excluded from the tint_color color so the tint color will show for values from 50 to 20 and from 20 to 50 blink_ bounds Indicates an alternate color to apply The color_bounds and tint_color_bounds attrib utes determine color application ranges Look at the color attribute for valid color val ues Note that the tint_color attribute does not support expressions Example tint_color red For boolean tags color_bounds and tint_color_bounds have predetermined values You can simply use tint_color to display a color for both Off and On states while color will supersede the color for the On state expression Numeric Expression Will cause any non writable tag to blink on the interface when boolean the value assigned to the attribute is not zero true value list A two elements list in the form low high where low and high are numeric values de termining the range of tag values where blinking will NOT be applied If specified on a read only tag the tag will visually blink with a period of 1 second for the values not in the specified range when the expression assigned to the blink attribute is true Example to set a tag to blink always blink_bounds inf inf Example to set a tag to blink when its value goes below 10 or above 10 blink_bounds 10 10 Example to set a boolean tag to blink for the On state blink_bounds 0 0 plot_color special Determines
118. ormat is not identical for all language localizations due to different use of delimiters ScadaMobile accepts any csv files in any of the supported languages but unfortunately this is not the case for MS Excel Consequently Excel may not correctly open the provided examples on the wrong language An Excel spreadsheet with the specification of variables consists of four 4 columns and one row per variable a DataTypesModbus csy B in_BOOLValue BOOL in_BOOLValue2 BOOL BOOLValue ReadOnly BOOL BOOLValue BOOL BOOLValue_ReadOnly2 BOOL BOOLValue2 BOOL BOOLValue3 BOOL BOOLValue4 BOOL in_INTValue_ReadOnly INT in_UINTValue_ReadOnly UINT in_DINTValue_ReadOnly DINT in_UDINTValue_ReadOnly UDINT in_REALValue_ReadOnly REAL INTValue_ReadOnly INT INTValue INT UINTValue_ReadOnly UINT UINTValue UINT DINTValue_ReadOnly DINT DINTValue DINT UDINTValue_ReadOnly UDINT UDINTValue UDINT REALValue_ReadOnly REAL REALValue REAL IR4 IR6 IR8 IR10 HR4 HR4 HR5 HR5 HRG HRG HRS ord 02 section DISCRETE INPUTS ord 04 section DISCRETE INPUTS ord 205 section COILS ord 206 section COILS ord 207 section COILS ord 208 section COILS ord 208 section COILS ord 208 section COILS label Default Read Only BOOL comment This is Coil 1 write_access 9 label Default Read Write BOOL comment This is Coil 1 too label Custom Read Only BOOL on_label O
119. ribute As said above variables with no ord attribute are moved to the end of the list always keeping their relative original order As sorting is performed variables ord numbers are used to determine Pages and Sections position order Pages are arranged in position orders determined by the smaller ord number of all variables belonging to each page In other words a particular Page will be shown in the order given by the ord number of the first variable belonging to that page Within each Page Sections are then arranged according to the smaller or first ord number of all variables belonging to that Section and Page Finally variables are placed within their Page and Section according to their ord number Example The following page section ord attributes in a series of tags from two sources will be arranged as shown below Source 1 Source 2 Attributes Attributes TAG A page Page 1 section Section 1 ord 1 TAG D page Page 1 section Section 2 ord 4 TAG B page Page 2 section Section 1 ord 2 TAG E page Page 2 section Section 2 ord 5 TAG C page Page 3 section Section 1 ord 3 TAG F page Page 3 section Section 2 ord 6 Resulting arrangement of tags in Pages and Sections Page 1 Page 2 Page 3 pag 40 101 www sweetwilliamsl com weetwilliam ScadaMobile 3 1 6 Look up Tables The Look up table feature allows a variable to pic
120. ring Temperatures CG Saa 40 2 Bearings Temperature Pum aides 39 7 Bearings Temperature www sweetwilliamsl com sweetwilliam StylesExampleModb csv ScadaMobile This example shows the available styles and some related tag attributes such as scale format bounds prefix suffix as well as the use of lookup tables iPod 22 15 a lt Tags Ee Enter value to change third text above Lookup Value group 2 f 5 f Enter value to change forth text above 1ag Exampies Weight f Enter rate 3399 g a 89 0 nter rate Weight 3 399 kg e Production Rate 89 0 C o Fan Control Selected Fan Speed Fan speed below 25 Speed 24 4 a Output Rate 89 0 Average StylesExampleEIP_PCCC csv Just to Change Above Texts vUdidl Vdites Scaling Formating wot 3 399 kg Scaled and Formated Value Bar Style Weight 3 399 kg Slider Style 3399 g e Format in Writable Value 555 yo Writable value with bezel and format Writable Value Writable value with no style 3399 Default Style Values are displayed this way with no style 3399 Default Style REAL value A real value with no style 35 0534 Bezel Style TEET Writable value with bezel style Aa Home iPod 22 15 LECE ay ala J 5a oe OS e U i Everything is OK Human presence detected in the restricted area This is entry 3 on the second table so it will show if tag value is 3 Sec
121. ription SMPulsels number They generate a square wave signal with the period implicit on the variable SMPulselQs read only name They can be used to implement a Keep Alive tag to write periodically a SMPuLse30s value on a PLC or to trigger periodic events for any purpose SMPulse6Qs SMAckButton number Variable linked to the Acknowledge button on the alarms panel Goes to 1 read only when the button is pushed and O when it is released SMCommState number A value indicating the current communication state of ScadaMobile Possible read only values are the following 0 Communications running with all PLC connections linked 1 Monitor is switched off 2 One or more PLC are not linked or a new connection is in course Partial link state 3 General communications error No communication is established This variable can be used to implement alarms related to PLC reachability or to show hide interface elements depending on PLC availability SMCommRoute number A value indicating the current communications route Possible values are the read only following 0 No remote communications are active but some local connections can still be running 1 All active communication links are running through the local_ip connection setting or the default Local connection setting No remote connections are active 2 At least one PLCs is linked through the remote_host connection setting or the default Remote
122. rmat in which commas are replaced by tabs which ScadaMobile also supports Using this format on texts editors is more convenient because it is more readable and you can avoid all the double quoting hassle The row shown above will look as fol lows using TABs as instead of commas as separators main_switch BOOL main_switch ord 1 section GENERAL label Main Run Stop Switch comment Main Process Start Stop access 3 write_access 5 pag 69 101 www sweetwilliamsl com sweetwilliam ScadaMobile 4 File Import and File Management in ScadaMobile ScadaMobile features an embedded Web Server that provides access to its file contents and enables administrator uses to per form various operations In addition file import from mail attachments and iTunes file sharing is also supported in the usual way for iOS applications To use the integrated Web Server follow the steps below 1 Go to Files tab and find the Embedded Web Server section by scrolling down 2 Switch on the Web Server 3 With ScadaMobile s File Server started copy on your PC s Web browser the IP address provided If you use Apple s Safari browser you can simply click on the relevant Bonjour link 4 Now use the available options on the displayed web page in order to move files to from ScadaMobile You can upload any files and store them in your iOS device fE Fies tom vesta re spim H all movistar gt 19 35 7 ce x BO me
123. rray element 16 test7ag 16 will contain bit O of HR2 Array element 31 testTag 31 will contain bit 15 of HR2 pag 24 101 www sweetwilliamsl com sweetwilliam ScadaMobile Note on EIP Native communication protocol AB Logix controllers Since EIP Native communications rely on symbolic names and type checking is performed on returned data type matching must be observed Basically most of the above patters are applicable in the general way as far as the data type specified in col umn B matches the actual type on the PLC tag This includes strings and arrays of any type From your perspective as integrator you do not need to treat Logix BOOL arrays in a special way as ScadaMobile handles them automatically for you in essence you can either access individual elements by just entering BOOL on column B and the particu lar array element on column C pattern 3 or you can get the complete or part of the array by specifying BOOL n on column B pattern 6 Note on Opto22 Native communication protocol Opto22 PAC controllers The Opto22 Native protocol is symbolic but it does not always carry type information Therefore all the above accessing patters except 1 and 2 are applicable and will work as described in most cases specially for Integer and Float data values The avail ability of access patters allows for advanced ways to get partial information from Opto22 strategy variables Pattern 4 is especially relevant to be considered when u
124. running ScadaMobile in the constrained environment of a mo bile device and still be able to support a very large number of tags with no noticeable performance penalties Using Expressions ScadaMobile expression syntax is based on the open source Ruby scripting language syntax For basic operations this syntax is similar to that of the C programming language and virtually identical to all modern scripting languages The Ruby language was chosen because it features a clean easy to learn object oriented syntax with a particular focus on ex pressions allowing for practical ways to represent and dealt with several data types and formats with great flexibility ScadaMo bile supports most operators including all common Logical Arithmetic and Comparison operators as well as commonly used Ruby functions and methods Support of Ruby expressions in ScadaMobile is a subset of the Ruby language Expressions are not and do not pretend to be a complete implementation of Ruby In some cases we provided a single way to accomplish something that can be done in sev eral ways on Ruby and in other cases we integrated several functionalities in single methods instead of implementing all of them So it is important to refer to this manual if you are also using a Ruby tutorial to determine what it is actually supported on ScadaMobile and which behavior differences may apply For those who already used Ruby one of the most obvious differences between pure
125. s example displays Inputs in channel O and Outputs in channel 1 for supported Omron PLCs No special settings or program installed in the PLC are needed This file was created in Excel DataTypes cxr Similar to the previous one but acting on internal PLC areas This serves the purpose of showing the supported data types It can be imported directly into a CX Programmer s symbol table This file was created in CX Programmer but does not require any program in the PLC FillATank cxr This is the most comprehensive example for Omron PLCs and it consists of a simulation of a water tank that is continuously emptied and filled by means of two Valve and Pump pairs with configurable levels and flows The file was created in CX Programmer and includes a complete program section that can be imported and run in any sup ported Omron PLC Since the process is actually simulated and run by a PLC it should be transfered to a PLC in order to get meaningful monitoring on ScadaMobile This example also features several access levels for the monitored process variables so you will also be able see how variables display change depending on current user s access level iPod 21 39 4 LECE p ee eee ee MM Main Run Stop Switch Main Process Start Stop Mo Tank Level L Water Tank Current Level 214 163 Output Flow L s 15 4 Current Output Flow from Tank High Level Set Point L 5
126. sed with Integer or Float Tables as it will prioritize the specified element size for example 2 bytes for INT n as opposed to the actual table element size always 4 for Opto and will still produce the effects described above so when reading integer elements from OPTO into INT arrays each OPTO table element will consume 2 ScadaMobile array elements Of course if you always use DINT n or REAL n strongly recommended each table element will correctly fit in one element both in the Opto22 PAC controller and the ScadaMobile app pag 25 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 4 Specification of Attributes column D Process Variables in ScadaMobile are represented in cells The behavior and display of the monitored variables can be configured In order to do so attributes can be set which determine that behavior As an example some of the available attributes are section label and comment 392 561 process va riable value 6 a Current Output Flow from Tank An attribute description in column D of a Source File follow this general pattern attribute value For example a boolean process variable like the one represented in the first cell on the figure above could have the following attribute description ord 1 section GENERAL label Main Run Stop Switch comment Main Process Start Stop access 3 write_access 5 The way the first cell on th
127. stSTag SINT 4 HR1 Array element 0 testS Tag 0 will contain the first byte of HR7 Array element 1 testSTag 1 will contain the second byte or HR1 Array element 2 testS Tag 2 will contain the first byte of HR2 Array element 3 testS Tag 3 will contain the second byte of HR2 5 Accessing individual bits of regular PLC memory valid on all protocols BOOL SINT INT DINT REAL in column B e HRx y in column C The variable in column A gets the value of bit y O or 1 of HRx regardless of its type For writes using this pattern guarantees that writes of individual bits on registers will not affect or overlap other bits in the same or other registers Example get HR1 0 as DINT testlag DINT HR1 0 testTag will contain O or 1 depending on the value in HR1 0 6 Accessing individual bits of PLC memory as an array of boolean values valid on all protocols BOOL n in column B e HRx in column C The variable in column A will be an array containing n elements of type BOOL The array gets its values starting from Bit zero of HRx taking the necessary following registers to complete all its data Note that writing BOOL arrays with a size that is not a multiple of the raw register size on PLC memory will cause the exceeding bits to be set to zero Example array of 32 BOOL starting at HR1 testlag BOOL 32 HRI Array element 0 testTag 0 will contain bit O of HR7 Array element 1 test7Tag 7 will contain bit 1 of HA7 A
128. taking either the full register or the necessary following registers to hold the complete value For types that are shorter than the actual register size the value in the PLC register is taken as a whole rather than trimmed to a shorter type Example get DINT at HR1 testlag DINT HR1 testTag will contain the DINT value contained in HR1 HR2 this is because DINT is 32 bits long and HRs hold 16 bits each Example get HR1 as a BOOL testTlag BOOL HRI testTag will contain 1 true if HA7 is not zero or O false otherwise HA7 raw value is therefore interpreted as boolean pag 23 101 www sweetwilliamsl com sweetwilliam ScadaMobile 4 Accessing regular PLC memory as an array of values valid on all protocols e SINT n INT n DINT n REAL n STRINGI n in column B e HRx in column C The variable in column A will be an array containing n elements of the specified type The array gets its values starting from HRx taking the necessary following registers to complete all its data according to data type size Data is packed as it is found in PLC memory for types that are shorter than the actual PLC register size and taking into account the native endianness of the proto col Example 1 get array of 2 REALs starting at HR1 testlag REAL 2 HR1 Array element 0 testTag 0 will contain the REAL value at HR1 HR2 Array element 1 testTag 1 will contain the REAL value at HR3 HR4 Example 2 get array of 4 SINTs starting at HR1 te
129. tal Input point digital_I_point counter read access to a DINT value with the Counter value of a Digital Input point anaLog_I0_point value read access to a REAL with the actual value of any Analog I O point analog_I_point min read access to a REAL with the min value of an Analog Input point analog_I_point max read access to a REAL with the min value of an Analog Input point I0_Point enabLled read access to an an 8 bit value register associated with an I O point to check if its I O Unit and I O Point Communication flags are enabled Note that these member access names are not available on the expressions engine but only as an extension for point variable definitions as entered in Column C In other words a point variable data structure cannot be read as a single object but only through its members Timers Timer values are accessed as any regular float variable Additionally some actions can be performed on timers when operated in write mode In such case particular commands are sent to the PAC controller as opposed to a data value To cause commands for appropriate actions to be sent you must set the row as writable by giving a suitable value to the write_access at tribute on Column D Also to prevent the interface to display the actual time value we recommend to set style button for rows meant to trigger an action Actions are specified using the dot notation with particular names as follows timer Actual value a REAL with the value of the Tim
130. temperature is presented formatted with a custom prefix and suffix appended to the actual value We can alternatively use the format function to simplify a bit some portions of the expression value SMPulsel s formatC Time s SMDate splitC 1 formatC Temp 3 1f F 9 5 celsius 32 pag 63 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 2 Omron s CX Programmer as a data source generator FINS TCP support in ScadaMobile includes the possibility to accept files generated directly from Omron s CX Programmer de velopment environment as Data Sources The steps to follow in this case are presented next 3 2 1 Build a project in CX Programmer If you are a PLC systems integrator or programmer you may already know how to use CX Programmer In this tutorial we pre tend to expose some key steps that you have to know to get your project properly monitored in ScadaMobile However a de tailed description of how a PLC program is made is beyond this manual Please refer to the OMRON documentation A CX Programmer project may look like this This is the PLC Validation Code for this project MOV 021 Move AA ABBA Source word D19998 Destination ABBA Hex 2 2 3 P_Off 2 CF114 KEEP 011 Keep Valve_1_mode ord 1000 section GENERAL label Main Run Stop Switct Bit H1 00 Pump_1_mode H1 01 Valve_2_mode H2 00 Pump_2_mode H2 01 P_Off 8 CF114 KEEP 011 Keep Run_Stop Valve_1_
131. ten be tween quotation marks for example section SECTION ONE text Main text in the cell representing a variable If not specified the variable name in col umn A will be used instead text Secondary text in the cell representing a variable If not specified a text comprising the variable address and its type will be displayed instead number Numeric value determining the order in which pages sections and rows are displayed see Pages Sections and Rows below for a further discussion on this attribute number Indicates the minimum access level an user needs to view a variable By default ac cess 9 is set number Indicates the minimum access level an user needs in order to trigger changes write to a process variable value Omitting this attribute forbids any change to the associ ated variable Tags to witch the user is able to write are referred to as Writable Tags on_label expression String Expression Text displayed for a read only boolean variable when its value is 1 string true off_label expression String Expression Text displayed for a read only boolean variable when its value is O string false button_label expression String Expression In combination with the button style it defines the text for a but string ton write_access Text to be prepended just before the variable value Example prefix Text to be appended to the variable value Example suffix pag 28 101 www sweetwi
132. th a letter and should not contain spaces or special characters They can be just informative if they are not used elsewhere or they can be functional if used as variables in expressions Vari ables can hold numeric values strings or arrays see Expressions Variable names given in column A have a meaning within the ScadaMobile environment but they are not necessarily aliases to actual Tag names in PLCs PLC tags are referred by address or name depending on protocol and given in column C 3 1 1 1 Tag Scope Tags can be defined to have a local or global scope Local variables are identified as per the general specification of variable names that is beginning with a letter Global variables are identified by placing a sign before their actual name Examples Local_var global_var Local variables have a scope limited to the data source file they are in When a local name is found in an expression its defini tion i looked for only in the same file the expression appears therefore you can use the same names and expressions in several source files without conflicts Global variables have an application wide scope so you can only have single instances of them across all selected source files The advantage of using them is that you can access to their values from anywhere in your project even if the project is made of several source files pag 12 101 www sweetwilliamsl com weetwilliam ScadaMobile 3 1 2 Specification of Variable T
133. that remain unacknowledged LarmCount read only SMCurrentUserName string User Name of the currently logged user read only SMCurrentUserAc number Access Level of the currently logged user cessLevel read only pag 53 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 1 11 4 Functions Methods and more about Operators Methods can be applied to intermediate expressions or variables to perform type conversions or to achieve particular require ments They are like computer language functions that perform particular tasks Not all methods are applicable to all types and their meaning can vary depending on type Methods are invoked by appending a dot method selector operator followed by its name to the variable or subexpression they apply to Operators can also have a different meaning depending on the type of data they are applied to In the following tables we represent the meaning of the applicable operators and methods depending on data type Numeric operators and methods e roe ca num operator num2 Arithmetic comparison logical operators produce the expected results Available operators are listed on the operators precedence table shown earlier The bitwise and complement operators ex tract the integral part of the operands before computing the result Example 2 2 returns 4 Returns bit n from the integral part of num Bit O is the least significant bit The result can be only O or 1 Example 3L
134. ther app This is intended to keeping alarms and graphs updated but it may have a negative impact on battery life When OFF ScadaMobile will close any open connection when another application becomes active or the device goes to the lock state either by the Auto Lock timeout or by pushing the bottom on the edge This will prevent excessive battery drain and may reduce carrier fees in case of cellular remote connections When the device is unlocked and ScadaMobile becomes active again communications with PLCs will be restarted The total time applications are normally allowed to run in the background or in the lock state is an Apple choice and it is currently set at 10 minutes Therefore ScadaMobile just as any other application will be switched off or suspended after this time has expired Therefore end users need to be instructed to put ScadaMobile in the foreground as soon as they have completed other tasks and not to allow the device to go to sleep if Keeping alarms and graphs updated at any time is essential Background process When ON the app will continue running in the background for an unlimited period of time while the user is performing other tasks thus keeping alarms and graphs updated and delivering local alarm notifications at all times While in the background an optional tick sound can be enabled to confirm users that the app is still alive Just select a suitable volume for the tick sound The sound will be played once when t
135. trategy Obligatory The Opto22 native protocol in ScadaMobile includes the use of a validation tag It is obligatory to declare this in the PAC Control strategy even though it is not used by the strategy On connecting to a PAC Controller ScadaMobile will first check for the existence of the validation tag in the strategy If it does not exist the connection is terminated In this way ScadaMobile will only connect to a PAC Control engine if the programmer has chosen to allow it The validation tag must use the name SMValidationTag and be an Integer32 variable type We also recommend that it is decla red as persistent Description Obligatory Tag for ScadaMobile Connection Type Integer 32 As a further security measure the value of this variable in the PAC Controller can be changed from the default 0x0000 to any value up to OxFFFF On any iOS device to connect to the PAC Controller the same hexcode must be configured in order to authorize the connection ScadaMobile App Menu Tab Connections Item Validation Code Dynamically changing this value in the PAC controller opens up the possibility for even more advanced access control e g a controlled timeframe for remote access by different users pag 68 101 www sweetwilliamsl com sweetwilliam ScadaMobile 3 5 Editing source files in a text editor Since Source Files created in any of the ways described above are simply CSV files they are essentially text fi
136. upported protocols ScadaMobile gets values from Industrial PLCs by polling them using TCP IP industrial protocols The following protocols are supported Pra LS Ne VY INAWIE SUT Not exhaustive EIP Native Allen Bradley ControlLogix and Native CIP communications using Ethernet IP explicit messag CompactLogix ing EIP PCCC Allen Bradley SCL505 and Mi PCCC commands DF 1 encapsulated in Ethernet IP crologix controllers other con trollers through 1761 NET ENI FINS TCP Omron CS1 CJ1 and newest For communication with Omron PLCs with ethernet communi cation capabilities Melsec TCP Mitsubishi FX Series Controllers For communication with Mitsubishi PLCs with ethernet com munication capabilities Modbus TCP Schneider Electric Automation For communication with PLCs and RTUs adopting the Modbus Direct Phoenix Contact TCP specification Wago Modbus over TCP Serial Modbus RTU devices You can connect to Modbus devices through a simple Ethernet to Serial gateway Opto22 Native Opto22 PAC controllers Native communications protocol for Opto22 PAC controllers Siemens ISO_TCP Siemens Simatic S7 1200 S7 RFC 2126 ISO Transport Service on top of TCP for Siemens 300 S7 400 controllers Step 7 programmable controllers pag 5 101 www sweetwilliamsl com sweetwilliam ScadaMobile 2 User Interface Elements This section provides an overview of the principal aspects of ScadaMobile user interface It does not pretend to be
137. y of n strings of size character capacity The actual representation of a STRING size in the PLC consists on the following pattern SIEMENS SIMATIC S7 STRING REPRESENTATION STRING size Size 1 byte Length 1 byte Characters variable size Although the above representations are the default ones for the mentioned controller brands ScadaMobile will still chose one of the above for use on controllers with no explicit STRING specification The choice will depend on whether you used a size specifier On most cases however you will want to use the raw char string representation CHAR n RAW CHAR STRING REPRESENTATION CHAR size Characters variable size For raw char string reads ScadaMobile will understand NULL character or the total buffer size as the termination of the string For writes ScadaMobile will pad all unused bytes with NULL characters This is the usual convention for raw character string representations pag 15 101 www sweetwilliamsl com sweetwilliam ScadaMobile Important note about Strings with Siemens Simatic S7 controllers The size field for STRINGS in S7 must be generally specified This is usually done in Siemens software by appending the size in square brackets just after STRING For example STRING 20 However ScadaMobile already uses square brackets to identify arrays so this notation conflicts with S7 notation To work around this we chose to use normal parentheses to indicate size Thus
138. ypes column B Data types determine mostly how variables will be displayed Non boolean Scalar Types can be represented on screen in vari ous ways such as a number a slider control or a progress bar Boolean values can be displayed in several formats depending on attributes Arrays of values can also be stored in variables and transferred from to PLCs By properly using array expressions you can re trieve individual values as desired To indicate that a variable holds an array you append n to its data type In such case n in dicates the total number of elements that the array will hold The following types are supported 007 lee 771 17 BOOL n Value that can adopt one of two states SINT n 8 bits signed integer value 128 127 INT n 16 bits signed integer value 32768 32767 UINT n 16 bits unsigned integer value 0 65535 UINT_BCD n 4 digit BCD value stored in a 16 bit register using 4 bits per digit 0 9999 DINT n 32 bits signed integer value 2147483648 2147483647 UDINT n 32 bits unsigned integer value 0 4294967295 UDINT_BCD n 8 digit BCD value stored in two 16 bit register using 4 bits per digit 0 99999999 REAL n 32 bits floating point value IEEE 754 aprox 1e38 1e38 CHANNEL n Same as UINT WORD n Same as UINT DWORD n Same as UDINT STRING n Type containing a characters string Actual representation depends on protocol for example Allen STR
Download Pdf Manuals
Related Search
Related Contents
Sony CX-NMT90 User's Manual Examens complémentaires en hématologie 100 % COMPATIBLE Waves/PRS Guitar Interface User Manual La Radio sin cálculos "` 税込23,940円 Documento de Garantía para productos Funzioni di sicurezza POUR TELECHARGER LA VISIONNEUSE Note Worthy Copyright © All rights reserved.
Failed to retrieve file