Tuesday, December 8, 2020

nios CPU frequency

 file:///C:/devkit_simple_socket_server_project/platform/q_sys/q_sys.html#module_cpu


Software Assignments

BIG_ENDIAN0
BREAK_ADDR0x00200820
CPU_ARCH_NIOS2_R1
CPU_FREQ50000000u

Thursday, December 3, 2020

OPC UA Open Source Build steps

 1) Git is installed in PC.

2) git clone https://github.com/open62541/open62541.git

3) git tag --list

4) git checkout v1.2-rc1

5) git describe --tags

6) create build directory and change into it.

7) git submodule init && git submodule update

8) cmake.exe .. -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=FULL -DUA_BUILD_EXAMPLES=ON

9) Open .vln project

10) Inside project, CMakePredefinedTags, build BUILD and INSTALL.


Thursday, October 29, 2020

Autosar: PduR

  The PDU Router module determines the destination of a PDU by using the PDU ID and a static configuration table.

Assignment

Find PDU IDs and static configuration Table.


Monday, October 12, 2020

MasterSar: Interrupt Priority Levels and OsInterruptLevel

 Autosar\Gendata\Src\IntVect.c

      /* b0: CMT1_6 */
      /* event code is in the INTEVT register */
      case 0x1640:
         osDelayedIntfunc();


CMT1_6 Reserved Reserved CMT1_6 H’1640 IPRGS3[7:4] IMR3S3[5]


AUTOSAR\GenData\Src\intvect.src(268): _osIPRInit   ; initialisation of IPR registers

   mov.l #H'ffd50018,R0     ; IPR36 -> Timer and Delayed int are set to priority levels of 1 and 1
   mov.l #H'0110,R1
   mov.l #H'f00f,R2
   mov.w @R0,R3
   and   R2,R3
   or    R1,R3
   mov.w R3,@R0


/* KB begin osekHwDefinitions (overwritten) */
#define osdOSEKTaskLevel          0     /* has to be 0! */

#define osdSystemIntLevel 8



IPRn priority level
:
1111 : Highest priority
.....
0001 : Lowest priority
0000 : mask interrupt


Sunday, August 30, 2020

Arm Compiler 5 Predefined Macros (When Cortex-A9 is target)

#define __STDC__ 1
#define __STDC_VERSION__ 199409L
#define __EDG__ 1
#define __EDG_VERSION__ 407
#define __EDG_SIZE_TYPE__ unsigned int
#define __EDG_PTRDIFF_TYPE__ int
#define __sizeof_int 4
#define __sizeof_long 4
#define __sizeof_ptr 4
#define __ARMCC_VERSION 5060750
#define __TARGET_CPU_ARM7TDMI 1
#define __TARGET_FPU_SOFTVFP 1
#define __CC_ARM 1
#define __arm 1
#define __arm__ 1
#define __TARGET_ARCH_4T 1
#define __TARGET_ARCH_ARM 4
#define __TARGET_ARCH_THUMB 1
#define __TARGET_ARCH_A64 0
#define __TARGET_ARCH_AARCH32 1
#define __TARGET_FEATURE_HALFWORD 1
#define __TARGET_FEATURE_THUMB 1
#define __TARGET_FEATURE_MULTIPLY 1
#define __TARGET_FEATURE_EXTENSION_REGISTER_COUNT 0
#define __a32__ 1
#define __OPTIMISE_SPACE 1
#define __OPT_SMALL_ASSERT 1
#define __OPTIMISE_LEVEL 2
#define __SOFTFP__ 1

DS-5 Arm Compiler 6 Predefined Macros (When Cortex-A9 is target)

#define _ILP32 1
#define _USE_STATIC_INLINE 1
#define __APCS_32__ 1
#define __ARMCC_VERSION 6100100
#define __ARMCOMPILER_VERSION 6100100
#define __ARMEL__ 1
#define __ARM_32BIT_STATE 1
#define __ARM_ACLE 200
#define __ARM_ARCH 4
#define __ARM_ARCH_4T__ 1
#define __ARM_ARCH_ISA_ARM 1
#define __ARM_ARCH_ISA_THUMB 1
#define __ARM_EABI__ 1
#define __ARM_FP16_ARGS 1
#define __ARM_FP16_FORMAT_IEEE 1
#define __ARM_NO_IMAGINARY_TYPE 1
#define __ARM_PCS 1
#define __ARM_PROMISE __builtin_assume
#define __ARM_SIZEOF_MINIMAL_ENUM 4
#define __ARM_SIZEOF_WCHAR_T 4
#define __ARM_TARGET_COPROC 1
#define __ARM_TARGET_COPROC_V4 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
#define __BIGGEST_ALIGNMENT__ 8
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __CHAR16_TYPE__ unsigned short
#define __CHAR32_TYPE__ unsigned int
#define __CHAR_BIT__ 8
#define __CHAR_UNSIGNED__ 1
#define __CLANG_ATOMIC_BOOL_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __CLANG_ATOMIC_CHAR_LOCK_FREE 1
#define __CLANG_ATOMIC_INT_LOCK_FREE 1
#define __CLANG_ATOMIC_LLONG_LOCK_FREE 1
#define __CLANG_ATOMIC_LONG_LOCK_FREE 1
#define __CLANG_ATOMIC_POINTER_LOCK_FREE 1
#define __CLANG_ATOMIC_SHORT_LOCK_FREE 1
#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __CONSTANT_CFSTRINGS__ 1
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
#define __ELF__ 1
#define __ESCAPE__ 
#define __FINITE_MATH_ONLY__ 1
#define __FLT16_DECIMAL_DIG__ 5
#define __FLT16_DENORM_MIN__ 5.9604644775390625e-8F16
#define __FLT16_DIG__ 3
#define __FLT16_EPSILON__ 9.765625e-4F16
#define __FLT16_HAS_DENORM__ 1
#define __FLT16_HAS_INFINITY__ 1
#define __FLT16_HAS_QUIET_NAN__ 1
#define __FLT16_MANT_DIG__ 11
#define __FLT16_MAX_10_EXP__ 4
#define __FLT16_MAX_EXP__ 15
#define __FLT16_MAX__ 6.5504e+4F16
#define __FLT16_MIN_10_EXP__ (-13)
#define __FLT16_MIN_EXP__ (-14)
#define __FLT16_MIN__ 6.103515625e-5F16
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_EVAL_METHOD__ 0
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_RADIX__ 2
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4
#define __GXX_ABI_VERSION 1002
#define __ILP32__ 1
#define __INT16_C_SUFFIX__ 
#define __INT16_FMTd__ "hd"
#define __INT16_FMTi__ "hi"
#define __INT16_MAX__ 32767
#define __INT16_TYPE__ short
#define __INT32_C_SUFFIX__ 
#define __INT32_FMTd__ "d"
#define __INT32_FMTi__ "i"
#define __INT32_MAX__ 2147483647
#define __INT32_TYPE__ int
#define __INT64_C_SUFFIX__ LL
#define __INT64_FMTd__ "lld"
#define __INT64_FMTi__ "lli"
#define __INT64_MAX__ 9223372036854775807LL
#define __INT64_TYPE__ long long int
#define __INT8_C_SUFFIX__ 
#define __INT8_FMTd__ "hhd"
#define __INT8_FMTi__ "hhi"
#define __INT8_MAX__ 127
#define __INT8_TYPE__ signed char
#define __INTMAX_C_SUFFIX__ LL
#define __INTMAX_FMTd__ "lld"
#define __INTMAX_FMTi__ "lli"
#define __INTMAX_MAX__ 9223372036854775807LL
#define __INTMAX_TYPE__ long long int
#define __INTMAX_WIDTH__ 64
#define __INTPTR_FMTd__ "d"
#define __INTPTR_FMTi__ "i"
#define __INTPTR_MAX__ 2147483647
#define __INTPTR_TYPE__ int
#define __INTPTR_WIDTH__ 32
#define __INT_FAST16_FMTd__ "hd"
#define __INT_FAST16_FMTi__ "hi"
#define __INT_FAST16_MAX__ 32767
#define __INT_FAST16_TYPE__ short
#define __INT_FAST32_FMTd__ "d"
#define __INT_FAST32_FMTi__ "i"
#define __INT_FAST32_MAX__ 2147483647
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_FMTd__ "lld"
#define __INT_FAST64_FMTi__ "lli"
#define __INT_FAST64_MAX__ 9223372036854775807LL
#define __INT_FAST64_TYPE__ long long int
#define __INT_FAST8_FMTd__ "hhd"
#define __INT_FAST8_FMTi__ "hhi"
#define __INT_FAST8_MAX__ 127
#define __INT_FAST8_TYPE__ signed char
#define __INT_LEAST16_FMTd__ "hd"
#define __INT_LEAST16_FMTi__ "hi"
#define __INT_LEAST16_MAX__ 32767
#define __INT_LEAST16_TYPE__ short
#define __INT_LEAST32_FMTd__ "d"
#define __INT_LEAST32_FMTi__ "i"
#define __INT_LEAST32_MAX__ 2147483647
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST64_FMTd__ "lld"
#define __INT_LEAST64_FMTi__ "lli"
#define __INT_LEAST64_MAX__ 9223372036854775807LL
#define __INT_LEAST64_TYPE__ long long int
#define __INT_LEAST8_FMTd__ "hhd"
#define __INT_LEAST8_FMTi__ "hhi"
#define __INT_LEAST8_MAX__ 127
#define __INT_LEAST8_TYPE__ signed char
#define __INT_MAX__ 2147483647
#define __I__ 1.0if
#define __LDBL_DECIMAL_DIG__ 17
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_DIG__ 15
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_MAX_10_EXP__ 308
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __LITTLE_ENDIAN__ 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __LONG_MAX__ 2147483647L
#define __NO_INLINE__ 1
#define __OBJC_BOOL_IS_BOOL 0
#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3
#define __OPENCL_MEMORY_SCOPE_DEVICE 2
#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4
#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1
#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412
#define __POINTER_WIDTH__ 32
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __PTRDIFF_FMTd__ "d"
#define __PTRDIFF_FMTi__ "i"
#define __PTRDIFF_MAX__ 2147483647
#define __PTRDIFF_TYPE__ int
#define __PTRDIFF_WIDTH__ 32
#define __REGISTER_PREFIX__ 
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __SIG_ATOMIC_MAX__ 2147483647
#define __SIG_ATOMIC_WIDTH__ 32
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_LONG__ 4
#define __SIZEOF_POINTER__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZE_FMTX__ "X"
#define __SIZE_FMTo__ "o"
#define __SIZE_FMTu__ "u"
#define __SIZE_FMTx__ "x"
#define __SIZE_MAX__ 4294967295U
#define __SIZE_TYPE__ unsigned int
#define __SIZE_WIDTH__ 32
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_VERSION__ 201112L
#define __STDC__ 1
#define __UINT16_C_SUFFIX__ 
#define __UINT16_FMTX__ "hX"
#define __UINT16_FMTo__ "ho"
#define __UINT16_FMTu__ "hu"
#define __UINT16_FMTx__ "hx"
#define __UINT16_MAX__ 65535
#define __UINT16_TYPE__ unsigned short
#define __UINT32_C_SUFFIX__ U
#define __UINT32_FMTX__ "X"
#define __UINT32_FMTo__ "o"
#define __UINT32_FMTu__ "u"
#define __UINT32_FMTx__ "x"
#define __UINT32_MAX__ 4294967295U
#define __UINT32_TYPE__ unsigned int
#define __UINT64_C_SUFFIX__ ULL
#define __UINT64_FMTX__ "llX"
#define __UINT64_FMTo__ "llo"
#define __UINT64_FMTu__ "llu"
#define __UINT64_FMTx__ "llx"
#define __UINT64_MAX__ 18446744073709551615ULL
#define __UINT64_TYPE__ long long unsigned int
#define __UINT8_C_SUFFIX__ 
#define __UINT8_FMTX__ "hhX"
#define __UINT8_FMTo__ "hho"
#define __UINT8_FMTu__ "hhu"
#define __UINT8_FMTx__ "hhx"
#define __UINT8_MAX__ 255
#define __UINT8_TYPE__ unsigned char
#define __UINTMAX_C_SUFFIX__ ULL
#define __UINTMAX_FMTX__ "llX"
#define __UINTMAX_FMTo__ "llo"
#define __UINTMAX_FMTu__ "llu"
#define __UINTMAX_FMTx__ "llx"
#define __UINTMAX_MAX__ 18446744073709551615ULL
#define __UINTMAX_TYPE__ long long unsigned int
#define __UINTMAX_WIDTH__ 64
#define __UINTPTR_FMTX__ "X"
#define __UINTPTR_FMTo__ "o"
#define __UINTPTR_FMTu__ "u"
#define __UINTPTR_FMTx__ "x"
#define __UINTPTR_MAX__ 4294967295U
#define __UINTPTR_TYPE__ unsigned int
#define __UINTPTR_WIDTH__ 32
#define __UINT_FAST16_FMTX__ "hX"
#define __UINT_FAST16_FMTo__ "ho"
#define __UINT_FAST16_FMTu__ "hu"
#define __UINT_FAST16_FMTx__ "hx"
#define __UINT_FAST16_MAX__ 65535
#define __UINT_FAST16_TYPE__ unsigned short
#define __UINT_FAST32_FMTX__ "X"
#define __UINT_FAST32_FMTo__ "o"
#define __UINT_FAST32_FMTu__ "u"
#define __UINT_FAST32_FMTx__ "x"
#define __UINT_FAST32_MAX__ 4294967295U
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST64_FMTX__ "llX"
#define __UINT_FAST64_FMTo__ "llo"
#define __UINT_FAST64_FMTu__ "llu"
#define __UINT_FAST64_FMTx__ "llx"
#define __UINT_FAST64_MAX__ 18446744073709551615ULL
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __UINT_FAST8_FMTX__ "hhX"
#define __UINT_FAST8_FMTo__ "hho"
#define __UINT_FAST8_FMTu__ "hhu"
#define __UINT_FAST8_FMTx__ "hhx"
#define __UINT_FAST8_MAX__ 255
#define __UINT_FAST8_TYPE__ unsigned char
#define __UINT_LEAST16_FMTX__ "hX"
#define __UINT_LEAST16_FMTo__ "ho"
#define __UINT_LEAST16_FMTu__ "hu"
#define __UINT_LEAST16_FMTx__ "hx"
#define __UINT_LEAST16_MAX__ 65535
#define __UINT_LEAST16_TYPE__ unsigned short
#define __UINT_LEAST32_FMTX__ "X"
#define __UINT_LEAST32_FMTo__ "o"
#define __UINT_LEAST32_FMTu__ "u"
#define __UINT_LEAST32_FMTx__ "x"
#define __UINT_LEAST32_MAX__ 4294967295U
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST64_FMTX__ "llX"
#define __UINT_LEAST64_FMTo__ "llo"
#define __UINT_LEAST64_FMTu__ "llu"
#define __UINT_LEAST64_FMTx__ "llx"
#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __UINT_LEAST8_FMTX__ "hhX"
#define __UINT_LEAST8_FMTo__ "hho"
#define __UINT_LEAST8_FMTu__ "hhu"
#define __UINT_LEAST8_FMTx__ "hhx"
#define __UINT_LEAST8_MAX__ 255
#define __UINT_LEAST8_TYPE__ unsigned char
#define __USER_LABEL_PREFIX__ 
#define __VERSION__ "4.2.1 Compatible Clang 7.0.0 "
#define __WCHAR_MAX__ 4294967295U
#define __WCHAR_TYPE__ unsigned int
#define __WCHAR_UNSIGNED__ 1
#define __WCHAR_WIDTH__ 32
#define __WINT_MAX__ 2147483647
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __arm 1
#define __arm__ 1
#define __clang__ 1
#define __clang_major__ 7
#define __clang_minor__ 0
#define __clang_patchlevel__ 0
#define __clang_version__ "7.0.0 "
#define __llvm__ 1

Wednesday, August 12, 2020

MasterSar: OS porting

Gendata/Src/intvectC.c - Interrupt Vector Table defined.

BSW/OS/isrmacro.inc - EnterISRMac and LeaveISRMac Definitions. (??????_cat2)

Gendata/Src/intvect.src - Wrapper functions for the Interrupt Service Routines called from Interrupt vector table

Two interrupts for Os. 1) osDelayedIntfunc() for just generating an interrupt on next cycle, so that the scheduling will be carried out.

2) osTimerInterrupt(): For other Timer purposes.




Thursday, July 30, 2020

MasterSar: Initialize one

main()
{

EcuM_Init();

}

-- Bsw/EcuM/EcuM.c --

EcuM_Init()
{
    /* Set the current state of the EcuM to STARTUP */
    ECUM_STATE_STARTUP;

EcuM_AL_SetProgrammableInterrupts(); /* Source/EcuM_Callout_stubs.c */

    ECUM_DRIVERINITLIST_ZERO(); /* EcuM_AL_DriverInitZero() */

    /* Clear wakeups from all sources */
    EcuM_InternalClearWakeupEvent(ECUM_WKSOURCE_ALL_SOURCES); /*   Clear EcuM_BswM_BufferedWakeups & EcuM_ValidatedWakeups */

    /* Set the current state of the EcuM */
    EcuM_SetModuleState(ECUM_STATE_STARTUP_ONE);

    /* configuration pointer of the module */
    ECUM_DRIVERINITLIST_ONE(); /* Source/EcuM_Callout_stubs.c */

    EcuM_ValidatedWakeups |= ECUM_WKSOURCE_RESET;

    /* Store this source in the BufferedWakeups to validate it at the end of EcuM_StartupTwo */
    EcuM_BswM_BufferedWakeups |= ECUM_WKSOURCE_RESET;

    /* the global variables must be set directly at this place. */
    EcuM_CurrentShutdownTarget = EcuM_GetDefaultShutdownTarget();
    EcuM_CurrentShutdownMode = EcuM_GetDefaultShutdownMode();

    /* Start the AUTOSAR OS with the corresponding default appmode */
    EcuM_StartOS(EcuM_GetDefaultAppMode()); /* Source/EcuMCalloutStubs.c */

}

-- Source/EcuM_Callout_stubs.c --
FUNC(void, ECUM_CODE) EcuM_AL_DriverInitZero(void)
{
  ComM_InitMemory(); /* ComM/ComM.c */ ComM_InitStatus = COMM_UNINIT
  CanSM_InitMemory(); /* CanSM/CanSM.c */ CanSM_IsInitialized = CANSM_INITFUNCTION_NOT_CALLED;
  Com_InitMemory();   /* Com/Com.c */   Com_SetInitialized(FALSE);
  PduR_InitMemory(); /* PduR/PduR.c */  PduR_SetInitialized(FALSE);
  CanTrcv_30_Tja1145_InitMemory();
  BswM_InitMemory();  /* BswM/BswM.c */ BswM_SetInitialized(FALSE);
  Dem_InitMemory();   /* Dem/Dem.c */ Dem_InitState = DEM_INIT_UNINITIALIZED;
  Can_InitMemory(); /* Can/Can.c */   canConfigInitFlag = CAN_STATUS_UNINIT;  /* CAN103 */
  CanNm_InitMemory(); /* CanNM/CanNM.c */ CanNm_GetSizeOfNmState times CanNm_SetNmState(i, NM_STATE_UNINIT);
  CanTp_InitMemory(); /* CanTp/CanTp.c */ CanTp_Data_InitState() = CANTP_STATUS_NOT_INITIALIZED;
  Dem_PreInit( Dem_Config_Ptr ); /* Null */
  CanIf_InitMemory(); /* CanIf/CanIf.c */  CanIf_GetCtrlMode(CanIf_Controller_Value_Local) = CANIF_CS_UNINIT;
  Rte_InitMemory(); /* Gendata/src/Rte.c */   Rte_InitState = RTE_STATE_UNINIT; RteMemClr;
fc_sys_SetBrdID(); /* PF_SYS_MNG/src/SysGetUp.c */
fs_sys_CacheOn();
fc_sys_ResetStart();
fc_sys_AccStart( TRUE );
fc_iop_AccOn(); /* PrjMnGb/CNF/CnfIopTb.c */
fs_wrp_IniFlgSts();/*PF_SYS_WRP/Src/WrpSysCall.c */

}

/* Dem/Dem.c */
Dem_PreInit()
{
    Dem_Queue_PreInit(); -> EventCount = 5, Just initializing 5 variables to 0.
Dem_Mem_PreInit(); -> Initializing to 0.
    Dem_Esm_PreInit(); -> Setting debouncing values to 0.
    Dem_DtcSettingDisabled = FALSE;
    /* At this point:
       - BSW error reporting is enabled (Dem_ReportErrorStatus)
       - NvM has write access to RAM buffers (Dem may not access them!) */
    Dem_InitState = DEM_INIT_PREINITIALIZED;


}

/* Source/EcuMCalloutStubs.c */
void EcuM_StartOS(AppModeType appMode)
{
    fs_wrp_MemLibInit(); /* PF_SYS_WRP/src/WrpMemLb.c */ /* All (fixed) memory pools (like descriptors) for applications */

    fc_swc_MngInit(); /* PF_SWC_APL/src/SwcMng.c */

    /* Start OS must be called for each core */
    StartOS(appMode); appMode = 1, /* _osStartOSasm(); BSW/Os/Osekasm.s79 */

}

-- BSW/Os/Osekasm.s79 --
_osStartOSasm:;   - assembler part of startup code
   ; disable all interrupts
   ; set stack pointer to system stack
   ; set GBR register
   ; initialize minimun interrupts in interrupt priority table ;_osIPRInit
   ; jump to C part of StartOS
   osStartOSc();

/* BSW/Os/Osek.c */
osqFunc1 void osqFunc2 osStartOSc(void)
{
    osInitialize();
    osDisableLevel(); /* set_imask */

   osInitTCBs(); /* 53 Tasks */  osTcbActivationCount[nt]= 0; /* 42 priorities osQReadyTaskHead[np]= osQReadyTaskTail[np]= 0; */

   /* KB begin osekHWosFillTaskStacks (default) */
   osFillTaskStacks();
   osLastActiveTaskIndex = 0;
   osActiveTaskPrio = osHighReadyTaskPrio = osdNoActivePrio; /* mark as invalid for a nested interrupt */
   osActiveTaskIndex = osHighReadyTaskIndex = osdNoActiveTask;
   osIntNestingDepth = 0;
   osStartDispatcher = 0;
   osLockDispatcher = 1; /* lock dispatcher during StartOS */

   /* fullfills [SR:167] of $\AutosarOS\general\Generation5\_doc\12_SystemRequirements\RequirementsSpec_MicrosarOS.doc */
   osActiveISRID = INVALID_ISR;
   osIntAPIStatus = 0;
   /* assure that OS variables are really linked to RAM, osIntAPIStatus is volatile so compiler optimizations do not disturb */
   osIntAPIStatus = 7;
   osIntAPIStatus = 0;
   osResGlobalOccupationCounter = 0;

   for (nr=0; nr<osrNumberOfAllResources; nr++) { /* 36 */
         osResOccupationCounter[nr] = 0;
         osResActualTask[nr] = osdNoActiveTask;
   }

   /* activate all autostart tasks: Only one activated */
   for (nt= 0; nt < osrNumberOfAllTasks; nt++)
   {
      osTcbTaskState[nt] = SUSPENDED;
      if ((oskTcbAutoStart[nt] & osActiveAppMode) != 0)
      {
         (void) osSysActivateTask(nt);
      }

    osInitAlarms();

    /* setting up the task switch interrupt (alias dispatcher interrupt alias delayed interrupt) */
    osInitDelayedInt(); /* Gendata/Src/tcp.c */

   osInitTimer(); /* initialization of the hardware timer now after the startup-hook */

   /* free dispatcher (after osSysActivateTask for AutoStart-Tasks and after StartupHook */
   osLockDispatcher = 0;

   /* enable task level interrupt */
   osEnableLevel(); 

   osDispatch(); /* BSW\Os\osekext.h */ Executes the first task Init_Taskfunc */

}

/* BSW/Os/Osektask.c */
osqFunc2 osSysActivateTask(TaskType taskIndex) { /* PRQA S 1503 */
    priority = oskTcbHomePrio[taskIndex];
    osTcbTaskState[taskIndex] = PRE_READY;
    osTcbActivationCount[taskIndex]++;
    oskQActivationQueues[priority][osQReadyTaskTail[priority]]= taskIndex;
    osQReadyPrios[oskTcbReadyPrioOffset[taskIndex]]|= oskTcbReadyPrioMask[taskIndex];
    osQReadyTaskTail[priority]++;
    /* start dispatcher only if new task has greater prio */
    if (priority < osHighReadyTaskPrio)
    {
        osHighReadyTaskPrio   = priority;
        osHighReadyTaskIndex  = taskIndex;
        osStartDispatcher= osdTRUE;     /* for return from idle loop */
    }
    return E_OK;
}

/* BSW/os/OsekTime.c */
osInitAlarms()
{
    osInitMinHeap();
   /* for (alarmID= 0; alarmID < osrNumberOfAlarms; alarmID++) */
   initialize to 0
}

Monday, July 27, 2020

MasterSar: Code reading __Common

>> _Common

1. Can_GeneralTypes.h
    * It describes the type definitions of the AUTOSAR CAN components Can,CanIf,CanTrcv.
    * It includes ComStack_Types.h, Can_DrvGeneralTypes.h and CanIf_GeneralTypes.h.
    * Structure's CanTrcv_TrcvModeTypeTag, CanTrcv_TrcvWakeupModeTypeTag and CanTrcv_TrcvWakeupReasonTypeTag are defined as typedef enum to map string literials
       to integers.
    * And there is no need to include these structures when CAN Transceiver Driver.

2. Compiler.h
    * It defines different funcions macros for the declaration and definition of functions, that ensures correct syntax of function declarations.
    * It includes Compiler_Cfg.h.
   ---
    Seems to be same as IDE preprocessor definitions.

3. Compiler_cfg.h
    * It includes Rte_Compiler_Cfg.h.
    ---
    * Seems to be defining macros for CODE, CONST, PostBuildCFG, ZERO INIT, VAR_INIT, etc. for each modeule.
      I guess these are for defining sections for placement of each sections. These are for COM, CanSM,
      CDD, DEM, CAN, DrvDio, DrvFls, DrvMcu, DrvPort, DrvSPI, WDG, PDUR, CANIF, FEE, COM, NvM, CANNM, NM,
      BSWM, CRC, DET, CANTP, VstdLib, etc. Only CANIF has some valid definitions to CANIF_APPL_VAR.

3.a. MemMap.h

     * Just has defined detailed macros of the above said modules in Compiler_cfg.h.

4. ComStack_Types.h
    * It includes ComStack_Cfg.h and Std_Types.h.
    ----
    Some COMTYPE and COMSTACKTYPE version information is available repeatedly. NotificationResultType
    macros are defined. Seems to be common for all kind of notification.
    Also, has some Error coded related to ParameterChangeRequest and BusTrcv error codes available.
    Some other structures PDUInfoType, BufReqRetType are defined.
    Important errorcode macros, TpDataStateType TpParameterType are defined here.TP_DATACONF/TP_DATARETRY
    seems to be data state of retried data.

5. Std_Types.h
    * It includes Platform_Types.h and Compiler.h.
    * It contains Std_versionInfoType.
    ---
    VendorID, ModuleID, SwVersions, etc.

6. Platform_Types.h
    * It defines global data types and structures.
    ---
    Important CPU data/bus width, Byte Order (Endian), C Basic Data type definitions.

Monday, June 29, 2020

Running your Binaries in U-Boot

No need to worry about How to remove SD card from board, how to program my binary in it or U-Boot is running from non-removable SPI memory, etc. Just use

>loadb -> Just load your binary format executable through Kernmit -> send
>loady -> Load your binary through Y-modem
>loads -> Load your S3 record format exeuctable

>go <Load Address>

Sunday, May 24, 2020

PLC Questions

How to assign Initial values to Tags

http://www.plctalk.net/qanda/showthread.php?t=53556
For any defined tag, if it isn't initialized explicitly, it is retentive. All memory tags on the Logix platform are fully retentive, you don't mark them as you do with Siemens.

To set an initial value, if nothing is writing to the tag, just use the tag browser, and set it there. If you want to make sure that it initializes to a certain value, make an initialization routine, and scan it on "XIC S:FS", which is the first scan bit. In the routine, use MOV instructions to set the values you want.

OOP (Object Oriented Programming) and UDT (User Defined Data Types) are greatly appreciated.

plcdev.com/book/export/html/431na
This page has tips and tricks too.
http://www.plcdev.com/book/export/html/431na

Books

https://www.google.com/search?q=learning+rslogix+5000+programming+pdf&sxsrf=ALeKk01eNlor1_aUSIfq5cRirvH3BY1KQQ:1590304248402&ei=-B3KXvWOGOSF4-EPiYeC6Ac&start=10&sa=N&ved=2ahUKEwj16r3--MvpAhXkwjgGHYmDAH0Q8tMDegQIDBAx&biw=1024&bih=450

https://books.google.co.in/books?id=u-B5CgAAQBAJ&pg=PA167&lpg=PA167&dq=rs+logix+5000+tag+initialization&source=bl&ots=jO4qAwoOFk&sig=ACfU3U1TJsfVOAnItupXDmjjNoUXk8fYFA&hl=ja&sa=X&ved=2ahUKEwj9rZi26MvpAhV64jgGHaL1CRkQ6AEwFXoECAkQAQ#v=onepage&q=rs%20logix%205000%20tag%20initialization&f=false

I/O Mapping

Like our man-made tags, AB gives even the IO also as ready-made tags only. If you open the controller tags, you can see all IO tags. You can just create alias tags with IO names and assign them to the IO tags at the time of integration.







Friday, April 17, 2020

Tags in PLC

1) Derived Tags

It is like Volatile Variable and in separate scan list so that any change in any of element in the expression changes the value of Derived Tag is recalculated.

A derived tag is a tag whose value is the result of an expression. An expression can be simply a tag name, or it can be an equation made up of tag names, mathematical and logical operations, special functions, and If-Then-Else logic. Derived tag calculations are carried out at the FactoryTalk View SE Server (also called the HMI server).

Here’s an example of how a derived tag can be used. Suppose there are five weight sensors on a conveyor belt. The tag database contains one tag for each sensor, so the weight at each point on the conveyor belt is monitored. If the weight at any point is excessive, FactoryTalk View triggers an alarm. However, if no individual sensor detects an excessive weight, but the total of all five sensors is too high, an alarm might be triggered. To handle this case, you could set up a derived tag to sum the weights of all five sensors. Then, if this total, which would be the value of the derived tag, is too high, FactoryTalk View can trigger an alarm.

2) Memory Tags

Storing values in memory

Create HMI memory tags to store values without the need for an attached or accessible device. For example, you can use memory tags to:
• Store the result of a calculation.
• Act as a temporary counter or index.
• Maintain information about the system’s current state, for example, which graphic display was last shown.
A memory tag can be used to store values internally.

About retentive memory tags
By default, the value of an HMI memory tag reverts to the initial value specified for the tag, whenever the HMI server containing the tag is shut down and restarted.
To set up a memory tag to retain the last value it was set to, even after the HMI server is shut down, in the Tags editor, select the Retentive check box for the tag.
A retentive memory tag will always have the last value it had prior to the HMI server shutting down. In other words, the tag’s value will not revert to the initial value specified for the tag.


3) HMI Tags vs 4) Direct reference Tags




---
1) tag name

Name of the tag.

2) expression

Expressions built by tags, if~else conditions, etc.

3) command

Commands like Display, DerivedTagOn, etc.,

4) embedded variable

I think here the embedded variable differs with tags. They are like volatile. And, they are kept in scan list so that their values are updated at run time dynamically, even though currenlty on display. But, tags and all, just once while activating the window, they are updated.

Factory Talk View SE Network Components

What are the components and their purpose in the Factory Talk View System

1) Factory Talk View SE server (Called HMI server) -
Data or services the HMI server provides are HMI tag values, derived tags, command processing, data logging
- HMI tags
- Total data logged tags
- FactoryTalk View SE client sessions

An HMI server is considered to be ready when:
• The server is able to provide project components, such as graphic displays
and macros.
• The server is able to receive and run commands.
• HMI tag services are started and completely initialized.

2) Factory Talk View Network Directory (Network Directory) -
While the Network Directory is unavailable, you cannot modify the structure of
any dependent application. For example, you cannot add areas or servers to the application, create new security accounts, or change system security policies. The Network Directory server cannot be made redundant.

3) Factory Talk View Linx (data server) (called Device Server) (which can also be set up as FactoryTalk Alarms and Events device-based alarm server) - Manages all tags from devices for example, direct alarm instructions from Control Logix PLCs, like Device database
- Device tags per application
- Tags per FactoryTalk Linx data server

4) Factory Talk View SE client - The only HMI interface to visually display or control the data provided by the Factory Talk View SE server

5) FactoryTalk Alarms and Events Tag based alarm Server -
FactoryTalk tag-based alarms
Logix device-based alarms


6) RSLinx Classic server (or some other OPC data server) - For interfacing other third party OPC compliant Devices.

If a network application requires multiple HMI servers, data servers, or alarm
servers, to distribute the load, it is recommended that you install the necessary
software and run the servers on multiple host computers.





Sunday, March 29, 2020

Cache on Cortex-M7

MPU on Cortex-M4
https://www.st.com/resource/en/programming_manual/dm00046982-stm32-cortexm4-mcus-and-mpus-programming-manual-stmicroelectronics.pdf

----
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0321a/BIHEADII.html

System level cache

The Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M3, and Cortex-M4 processors do not have any internal cache memory. However, it is possible for a SoC design to integrate a system level cache.
----

http://www.keil.com/appnotes/files/apnt_270.pdf
Migrating Application Code from ARM Cortex-M4 to Cortex-M7 Processors


Cache Functions (only Cortex-M7)

For Assembly routines of Cache ARM® Cortex®-M7 Devices Generic User Guide

Tuesday, March 17, 2020

FactoryTalkView ME vs FactoryTalkView SE

Supervisory Level HMI Gives You the Complete View

Put away the steel-toed running shoes. FactoryTalk View Site Edition lets you cover a lot of ground without having to scurry from machine-to-machine. With a clear view across entire lines and production processes, FactoryTalk View SE lets you monitor and control distributed-server/multi-user applications. It provides a comprehensive and accurate picture of operations, meeting the demands of multiple stakeholders including engineering, maintenance, operations, and production Information Technology (IT).
FactoryTalk View SE provides robust and reliable functionality in a single software package that scales from a standalone HMI system to a distributed visualization solution. As our customers have experienced over the past few years, FactoryTalk View SE enables you to take advantage of mobility, virtualization, and other new technologies, meeting HMI challenges in process, batch and discrete applications and delivering critical visibility when and where you need it.

Machine-level Operator Interface Keeps It Real

Better than an extra set of eyes, the perfect machine-level human machine interface provides realistic displays to aid in continual and fast evaluation on performance. FactoryTalk View Machine Edition (ME) software is a versatile HMI application that provides a dedicated and powerful solution for machine-level operator interface devices. As an integral element of the Rockwell Automation visualization solution, FactoryTalk View Machine Edition provides superior graphics, runtime user management, language switching and faster commissioning time through a common development environment.

Wednesday, March 11, 2020

PLC: FactoryTalk View Machine Edition

FactoryTalk View Machine Edition is software for developing and running human-machine interface applications.

FactoryTalk View Studio is configuration software for developing machine-level applications.
FactoryTalk View ME Station is a stand-alone runtime environment for machine-level applications. Use FactoryTalk View ME Station to run the applications you develop in FactoryTalk View Studio.
FactoryTalk® Linx™ is a communication server built around FactoryTalk technology to assist in developing and running your FactoryTalk View ME applications.

You can run machine-level applications on the MobileView™, PanelView™ Plus 7, PanelView Plus 6, PanelView Plus, and PanelView Plus CE terminals, as well as on personal computers.

The FactoryTalk View Machine Edition software package also includes:
• FactoryTalk Services Platform
• FactoryTalk Administration Console
• FactoryTalk Live Data
• FactoryTalk Diagnostics
• FactoryTalk Activation Manager
• Communications software

These tools are installed with FactoryTalk View Studio:
• Application Documenter is a software that provides detailed information about FactoryTalk applications.
• FactoryTalk View ME Application Manager is a software for renaming, copying, deleting, backing up, and restoring applications.
• DeskLock is a software that prevents Windows operating system users from exiting the FactoryTalk View application at run time. You can use this tool to set up a customized desktop and to prevent access to Windows functions. You cannot use DeskLock if you are running your application on a PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, or PanelView Plus CE terminal.
• FactoryTalk View File Viewer is a software for viewing the following types of log files:
• SE datalog files
• ME datalog files
• ME alarm log files
• dBase files
• ME RecipePlus files
The log information can be shown in the form of list views or trend plots. You can save the files as CSV or dBase files so that it is easier to do more analysis.
• Legacy Tag Database Conversion is a software for converting your legacy tag database to a new format to work with Microsoft SQL database.
• ME Firmware Upgrade Wizard is a software for installing new firmware releases on PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, and PanelView Plus CE terminals.
• ME Transfer Utility is a software for transferring a runtime application file (.mer) between the development computer and a MobileView, PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, or PanelView Plus CE terminal, transferring Windows True Type font files (.ttf and .ttc) to a PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, or PanelView Plus CE terminal, and comparing a runtime application on a MobileView, PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, or PanelView Plus CE terminal with a runtime application on a desktop computer.
• Tag Import and Export Wizard is a software for importing or exporting the FactoryTalk View tag database.
• Rockwell Automation CSV Data Log Tamper Detection Utility is a software used to detect the integrity of a CSV data log file that contains tamper detection strings, generate a detection report, and save the report to a text file.

Diagnostics Viewer allows you to view FactoryTalk Diagnostics messages using the FactoryTalk Diagnostics Viewer.

Specifies the application type. The value is one of:
• sed – SE Network Distributed
• sen – SE Network Station
• sel – SE Local Station
• med – Machine Edition

Configure Power User settings
If the security designation for FactoryTalk View Studio users is Power Users, they may not have write access. To make sure that the settings for Power Users are correct, you need configure the Power User settings.

All editors use the Standard toolbar. The Graphic Displays, Graphic Libraries, Runtime Security, and Tags editors have additional toolbars.

The Explorer window has two tabs:
• The Application tab contains the editors for creating and editing your application, and the System folder for setting up FactoryTalk Security.
• The Communications tab contains the communications tree for the development computer. For more information about using the communications tree, see Help for FactoryTalk Linx.

Workbook tabs
If you select Workbook Mode from the View menu, the workspace shows tabs at the bottom for each open editor or component. Workbook Mode allows you to bring forward an open item more quickly than by using the Window menu.

Use the Explorer window
The Explorer window is the main tool for working with FactoryTalk View Studio. It lists the editors you use to develop your application, as well as the components, such as graphic displays, you created.
Use the Explorer window to set up security for your application. You can use the window to set up users and user groups, and to assign security access to FactoryTalk Directory to the application, and to networks and devices. For information about setting up security, see Set up security on page 183.
An application consists of one or more data servers and an HMI project (also known as an HMI server). The data servers provide communications for the project. The project consists of graphic displays, alarm information, user information, and other settings.


View an editor's components

With some editors you enter information in a single window or a tabbed dialog box. Other editors allow you to create multiple components, such as graphic displays or message files. Each component is stored in a separate file, with its own name.
You can create components in these editors:

• Graphics (components include graphic displays, global object displays, and graphic libraries, each in their own folder)
• Alarms
• Parameters
• Local Messages
• Information Messages
• Data Log Models
• Macros
• RecipePlus

Use the Images editor to copy bitmap images into your application (but not to create new images). Each image you copy is listed as a component under the editor.

Tip:
If the editor can create multiple components, the shortcut menu contains New. If the editor can only open a single component, the menu contains Open.

Enter information in spreadsheets
These editors contain spreadsheets:
• Tags
• Runtime Security (formerly User Accounts)
• Global Connections
• Local Messages
• Alarm Setup
• Information Setup
• Information Messages
• Macros
• RecipePlus Editor

In the Graphics editor, many of the Properties dialog boxes for setting up graphic objects contain spreadsheets for assigning tags or expressions to the objects.


To enter information in a cell in a spreadsheet

• In the Property Panel, double-click the cell and then type the information. If the cell already contains text, double-clicking highlights the text and typing replaces the highlighted text.

Print at runtime
Print graphic displays at runtime using the display print button, or using a remote display print. You can also send diagnostics and alarm messages to a printer at runtime.

Plan applications

• Understand the machines and processes you’re automating
• Collect data
• Design an HMI tag database
• Plan graphic displays and navigating between them
• Plan languages
• Plan alarms
• Provide information for the operator
• Plan trends
• Plan recipes
• Design a secure system

Understand the process
• Break up each section of the process into its constituent parts.
• Determine what type of communications you’ll be using — which network types, data servers, and devices.
• Determine which process variables you need to have access to and identify their locations in the programmable controllers.

Collect data
When planning data collection, design your system so only essential data is collected. Limiting data collection is important because collection activities require substantial processing power and generate a lot of traffic on the network.

Keep data collection requirements in mind when designing the layout of the programmable controller data tables and the HMI tag database. Ideally, tag addresses reference contiguous blocks of programmable controller data tables to reduce highway traffic and optimize system response. If you’re going to use data from an OPC server, read the server documentation to find out how to optimize traffic.

Design an HMI tag database
Tip:
If you are going to use direct referencing for all your tags, you don’t need to create HMI tags in FactoryTalk View.
Data Server tags usually update faster than HMI tags. To obtain the best system performance for your application, use Data Server tags where possible.

Collect information
Before you begin creating the tag database, collect:
• Flowcharts of your processes (or process and instrument diagrams).
• A list of programmable controller data table or register addresses your application will have access to.
• Machinery systems documentation.
• Alarm requirements

Organize tags
Before creating tags:
• Develop naming conventions for tags, choosing names that are familiar and logical to everyone. This makes troubleshooting easier.
• Group related tags.
Group tags in the way that makes the most sense for your application. For example, group all similar devices or group related areas of the plant floor.
When creating tags, place related tags into folders. For greater organization, nest folders.

Plan graphic displays
When planning displays, determine the best way for users to navigate through your displays and develop a template to establish a common look and feel for your displays.

• If the application runs on a MobileView, PanelView Plus 7, PanelView Plus 6, PanelView Plus, PanelView Plus Compact, or PanelView Plus CE terminal, the maximum number of displays is based on the amount of memory used by the application. Applications running on the terminal can contain as many displays as can fit in the memory of the terminal.

• PanelView Plus 7 Standard applications have a limit of 100 displays (50 On Top displays and 50 Replace displays).
• Compact Machine Edition applications have a limit of 25 displays.

• Whether the operator will be using a keyboard, touch screen, mouse, or combination of navigation and data entry methods.

Develop a hierarchy of displays
A hierarchy of displays is a series of graphic displays that provide progressively more detail as users move through them. Design your display hierarchy to meet the needs of the various users, including managers, supervisors, and operators.

Well-organized graphic displays present information clearly and consistently and guide users through the system. Before designing individual graphic displays, plan an overall display hierarchy and plan how users will navigate through the hierarchy.

Create a template to ensure consistency

It is possible to keep a consistent appearance among all the displays in an application by presenting the same pieces of information in the same place on each graphic display. To ensure uniformity, develop a display with common elements that acts as a template. Each time you develop a new display, start with a duplicate of the template.
For example, the template could contain:
• Your company logo
• A title
• The date and time
• Navigational buttons
Use global object displays to create template objects. You can copy the objects into your graphic displays, and update all the objects at once by updating the original object in the global object display.

Design displays
When designing displays, applying good visual design principles helps users and increases their efficiency.
Remember these important design principles:
Consistency
• Be consistent with your use of symbols and color.
• Be consistent with button labels and button placement.
When you design several displays, place the same kinds of buttons on the same positions. For example, if you have a Start button in a certain position in one display, don’t put a Stop button in the same position in the next display.
Clarity
• Use easily recognizable symbols. For example, use the conventional ISA symbols for tanks and valves.
• Don’t overload the screen with information.
• Use standard, clear terminology, and avoid abbreviations or acronyms that the user might not understand.
• Use colors with recognizable meanings. For example, in North America the colors red and green usually mean stop and start. Keep color meanings consistent by assigning red only to Stop buttons, and green only to Start buttons.
Some people are color blind to red and green so don’t rely on color alone to establish meaning.
• Use high contrast color combinations, such as yellow on blue.
Display types
• On Top display type is used to position the display in front of any other display that is already open at runtime.
• Replace display type is used to have the display close any open displays on the screen at runtime. Replace displays do not close displays of the type On Top that have the Cannot Be Replaced option selected. Only one Replace display can be open at a time.
Usability
• If you’re designing for a touch screen, don’t place important buttons where they’ll be blocked by an On Top display. The user can’t press a covered button. Also, ensure the button is large enough for users to touch easily.
• Ensure there is always a clear way to move between displays.
• Keep the intended user in mind and design displays so they are easy to understand and use. Ask the users to test the displays.

Plan alarms

Before setting up alarms, consider the following:
• What conditions will trigger alarms
• How operators will be notified of alarms
• What information you want alarm messages to contain
• How operators will respond to alarms
• The maximum number of alarm messages supported at runtime
• PanelView Plus 7 Standard applications have a limit of 500 alarms
• Compact Machine Edition applications have a limit of 200 alarms

Provide information for the operator

In addition to notifying the operator of alarm conditions, you can provide information and instructions about plant processes, and inform the operator about system activities.
Before setting up information notification, plan:
• What system activity the operator needs to be informed about
• What conditions will trigger information messages
• What information you want the messages to contain

Local and information messages

Use local messages to give the operator information in a specific graphic display while the display is open. Use information messages to give the operator information no matter which display is open.

Diagnostics messages

Set up diagnostics messages to notify the operator of system activity such as tag reads and writes, running macros, communication problems, or problems opening displays.

Plan trends

When planning trends, consider how they will be used. For example, will the trend be used to:
• Analyze process trends?
• Monitor production efficiency?
• Archive process variables to ensure compliance with government regulations?

Based on such considerations, you can determine:
• Which tags need to be plotted on the same trend.
• Which tags need to be logged by using a data log model.

Plan recipes

When planning recipes, consider how they will be used. For example, will recipes be used to:
• Compare tag values to pre-set data values?
• Upload tag values to existing or new data sets?
• Download values from data sets to tags?
• Archive tag values to ensure compliance with government regulations?
Based on such considerations, you can determine:
• Which tag sets and data sets to pair together in a recipe file.
• Which RecipePlus button actions to use with the RecipePlus selector and RecipePlus table.

Design a secure system

When deciding on your security requirements, consider whether to:
• Restrict access to every graphic display to prevent accidental changes.
• Restrict access to certain graphic displays.
• Have everyone log on.
• Use passwords, and if so, whether to have a minimum length, and whether to require that the passwords are changed periodically.
• Allow only authorized users to shut down the application.
• Use the DeskLock tool on Windows platforms to prevent users from switching to another application at runtime (for applications that will run on personal computers). You can use this tool to set up a customized desktop and to prevent access to Windows functions.
Based on these considerations, you can set up security for individual users or groups of users. For example, you might want to set up groups of users such as a manager group and an operator group.

Work with applications

An application consists of one or more data servers and an HMI project (also known as an HMI server). The data servers provide communications for the project. The project or HMI server consists of graphic displays, alarm information, user information, and other settings.

The HMI project file (.med) is in \Users\Public\Public Documents\RSView Enterprise\ME\HMI projects.The runtime application consists of a file with the extension .mer.

Component files

Component files are located in folders in the HMI project folder, as described in the following table. For example, graphic display component files (with the extension .gfx) are stored in the Gfx folder. You might need to navigate to the location of these files. For example, if you are adding a component from one application into another application.

External folders

The following table lists some FactoryTalk View folders that are external to the HMI project folder, and the types of files they contain.
The folders are in \Users\Public\PublicDocuments\RSView Enterprise

Default log file locations


Faceplate/Add-On Instruction Sets from Rockwell Automation
https://www.youtube.com/watch?v=dovrhBVXvfA

Create an application

FactoryTalk View Studio creates the application’s folders and files and then shows the new application in the Explorer window. The system automatically creates a display called MAIN and sets the initial graphic to Main.

Import an application

You can import the following application files to FactoryTalk View Studio and convert them to current version FactoryTalk View Machine Edition application files using Machine Edition Import Wizard:
• PanelBuilder® application (.pba or .pva)
• PanelBuilder32 application (.pba or .pva)
• PanelBuilder 1400e application (.pvc)
• RSView® Machine Edition application (.med)
• FactoryTalk View Machine Edition application (.med)

Configure Power User settings

If the security designation for FactoryTalk View Studio users is Power Users, they may not have write access. To make sure that the settings for Power Users are correct, you need configure the Power User settings.
To configure Power User settings
1. Navigate to \Users\Public\Public Documents\RSView Enterprise\ME\HMI projects, right-click the application folder, and select Properties.
2. On the Security tab of the Properties dialog box, select Power Users from the list of groups and user names.
3. In the Permissions box below the list, select Full Control and select the Allow check box.
4. Click OK.

Rename, copy, delete, back up, and restore applications

Use FactoryTalk View ME Application Manager.

About project settings

Tip:
Project settings affect how your graphic displays look. Specify project settings before you create graphic displays.

Usually, an application is designed to completely fill the runtime terminal or computer screen. If you want your application to do this, set the project window size to the resolution of the screen in pixels.


How the project window size affects the default message displays
These are the sizes of the default displays:
If your project window size is smaller than the default message display sizes, you can resize the default displays, or use your own displays instead.

PanelView Plus 7 Standard applications and Compact Machine Edition applications

Title bar

If you select this option, a title bar is used for all Replace graphic displays.
If you plan to set up security for your application and want to prevent unauthorized users from stopping the application, do not use a title bar.

Enable auto logout
Use the Project Settings Runtime tab to log the current user out automatically if the terminal is inactive for a specified period of time. You can set up the terminal to open a particular graphic display after the automatic logout, and you can apply a parameter file or parameter list to the display you select.
If no display is selected, whatever display was open at logout will remain open.

Set up communications

• Data servers
• OLE for Process Control (OPC) communications
• How to create data servers and set up communications

Data servers provide access to devices on the network, making it possible to browse, read, and write values from FactoryTalk View applications.

FactoryTalk View ME supports the following types of data servers:
Rockwell Automation Device Servers FactoryTalk Linx is the recommended data server for all Rockwell Automation devices and networks. FactoryTalk Linx does not require activation or licensing and can be installed as often as needed in any application.
OPC Data Servers are any data server that supports the OPC-DataAccess Standard v2.05a.
The OPC Foundation is a non-profit organization that provides standards and technology that enables software from different vendors to work together. The following OPC Data Access v2.05a servers are available with FactoryTalk View ME.
KepServer Enterprise is used to communicate with non-Rockwell Automation devices like Siemens or Modicon controllers. KepServer Enterprise does not require activation or licensing for FactoryTalk View ME.
RSLinx Classic can only be used with FactoryTalk View ME Station and should only be considered in the following situations:
    • CIP to non-CIP routing is required to reach the device.
    • Unsolicited messages are used to send data from controllers.
    • Alias topics (multiple paths to the same device) are required.

Create data servers

A FactoryTalk Linx data server is created automatically with a new application. It is located under the application’s HMI server in the Explorer window, just above the FactoryTalk System folder.

Set up FactoryTalk Linx data servers

You can use the Communication Setup editor to add drivers, add devices, set up driver and device properties, and set up device shortcuts.
In an existing application, double-clicking Communication Setup opens the Communication Setup editor, with its two tabs.

The Design (Local) tab is for establishing the location of the tags/addresses for editing. The tags/addresses can be online with a controller or other data server, or an offline controller file. This will enable the Tag Browser to find the tags/addresses.
The Runtime (Target) tab is for identifying the connection from the runtime computer or terminal to the controller or other data server. If the paths are the same, use the Copy button to copy the Design configuration to the Runtime tab.

Set up an OPC data server

If you need to connect third party devices, use a KEPServer Enterprise data server.
If you have one of the situations described above and you are using a personal computer or a MobileView terminal in your application, use RSLinx Classic data server.

If you need to view or use tag names when you are not connected to a device, you can set up a cache that will read in tag names from the device and enable them to be used when the device is offline.

Update data server caches
If tags are added, modified, or deleted on the data server, you must update (synchronize) the cache manually.

Set up communications

To set up communications
1. Gather information about your network and the devices that are connected to it. You will need this information to set up FactoryTalk Linx, KEPServer Enterprise, RSLinx Classic, or another OPC server. Do one of the following:
•If you want to use KEPServer Enterprise as the OPC server that enables communications on your network, set up KEPServer Enterprise on the development computer. For details, see KEPServer Enterprise Help.
•If you want to use RSLinx Classic as the OPC server that enables communications on your network, set up RSLinx Classic on the development computer. For details, see Getting Results with RSLinx, or see Help for RSLinx.
RSLinx Classic is available for FactoryTalk View ME Station on personal computers only.
•If you want to use an OPC server other than RSLinx Classic for communications on your network, set up the OPC server on the development computer. For details, see the documentation supplied with your OPC server.
2.In FactoryTalk View Studio, create a data server that points to the OPCserver you have installed.
If you are using FactoryTalk Linx for communications, you don’t need to create a data server because it is created automatically when you create your FactoryTalk View Machine Edition application.
3.If you want to use HMI tags in your application, open the Tags editor, and then create device tags that point to addresses in devices. For details about creating HMI tags, see Use HMI tags on page 103.
If you do not want to use HMI tags, but instead want to reference addresses in devices directly, skip this step.
Best practice is to use direct reference tags. 
4.In objects in graphic displays, or anywhere else you want access to values in tags, type the tag name using the syntax for your OPC server, or use the Tag Browser to select tags. For details about using tags, see Work with tags on page 87.
5.Create the runtime application file. For details, see Create runtime applications on page 227.
All the necessary tag information is compiled with the runtime application file.
6. If you are using an OPC server other than FactoryTalk Linx or RSLinx Classic, install the OPC server software on the runtime computer.
For applications that will run on a personal computer, the OPC server can be on a different (remote) computer than the runtime computer, but the remote computer must be on the same network as the runtime computer.

Work with tags

• Types of tags
• When to use data server tags
• Steps for using data server tags
• When to use HMI tags
• Steps for using HMI tags
• How to browse for tags and offline tags
• How to use the Tag Browser
• How to use tags and expressions in your application
• How to log tag values
• How to use macros to assign values to tags

A tag is a logical name for a variable in a device or in local memory (RAM). For example, a tag can represent a process variable in a programmable controller.

Data server tags
FactoryTalk View conforms to the OPC DA (Data Access) 2.05a specification for information exchange among automation or control applications, field systems or devices, and business or office applications.
In FactoryTalk View, data servers such as FactoryTalk Linx, RSLinx Classic, and KEPServer Enterprise provide access to OPC-DA-compliant tags. In the FactoryTalk View documentation, the tags you use through a data server are called data server tags.

Data server tags include tags found in Logix 5000 processors and tags from other OPC-compliant devices. You use data server tags by providing a direct reference to the tag’s location, wherever you want your application to use the data.

Starting from version 21, Logix controllers support the extended tag properties that are configurable in Studio 5000 Logix Designer®.

Starting from FactoryTalk View version 9.00.00, you can use the following extended tag properties when a controller tag type can be referenced:
• .@Description: Description of the tag
• .@EngineeringUnit: A system of measurements of physical quantities
• .@Min: The minimum numeric value for the non-Boolean tag being measured
• .@Max: The maximum numeric value for the non-Boolean tag being measured
• .@State0: The false Boolean state of the tag
• .@State1: The true Boolean state of the tag
To read the values, use the format TagName.@ExtendedProperty where TagName is the controller tag and ExtendedProperty is the extended tag property, for example, [Shortcut]SodaCIPTanks.Water.Value.@Min.

HMI tags

In addition to direct referencing tags from data servers, FactoryTalk View allows you to create tags with additional properties such as minimum and maximum values, scale, and offset. These tags can reference values at an external data source, or store values in the runtime computer’s memory. Tags you create in FactoryTalk View are called HMI tags.

The data source

The FactoryTalk View documentation uses the term data source as a generic term that includes all possible sources of tag data, for both data server tags and HMI tags.
The data source can be memory or a device such as a programmable logic controller or OPC server. The application writes values to and reads values from the data source.
The data source is configured to exchange information (in the form of numeric or string values) between the application and the physical machine that your project is controlling.

Basic steps for using tags

To use tags
1. If the tag does not exist, create the tag.
• To use a data server tag, you can use an existing tag in the processor (for example, a programmable controller), or you can create a new one in the processor or OPC server. For example, in a Logix 5000 processor, you could create the tag using your RSLogix 5000® or Studio 5000 Logix Designer® programming software.
• To use an HMI tag, you must first create it in the Tags editor. For details, see Use HMI tags on page 103.
2. Browse for or type the name of the tag anywhere you want to connect an object to data at runtime.
For example, to make a push button change a tag value when it is pressed, connect the push button to a tag by typing the tag name on the Connections tab of the push button’s Properties dialog box.
If you don’t know the names of tags, you can browse for them. You can browse while online and connected to a device, or you can browse for tags from an offline file, for example a Logix 5000 program file. To browse for tags, use the Tag Browser. For details, see Browse for tags.

Use tag names that don’t exist

You can type the name of a tag that does not exist. If you do this, ensure that you spell every instance of the tag name consistently, and that when you create the tag, you spell it the same way you did when you referred to it.

Performance considerations when using extended tag properties

Extended tag properties are integrated into the ControlLogix application program. On a controller, the metadata is stored in FLASH memory.
When loading a display that uses extended tag properties, all objects (for example, numeric display, button captions, and the like) will be wire-framed before all data and extended tag property data is read from the controller.

When to use data server tags

For some of the things you want to do in your application, you might not need to create HMI tags. Use direct references to tags located in devices instead, for example, tags located in an OPC server’s database.

Eliminate duplication

Using data server tags allows you to add, modify, or delete tags in a device without having to duplicate the changes in the FactoryTalk View HMI tag database.

Use complex data

Some devices, for example, Logix 5000 processors, support complex data types, such as arrays and structures. Your controller might have structures that contain hundreds of member elements.
Referencing tag values directly eliminates the need for creating an HMI tag for each member.
Direct reference tags usually update faster than HMI tags. To obtain the best system performance for your application, use direct reference tags where possible.

Use data server tags

To use data server tags
1. Create the tag in the OPC server or processor, or use an existing tag in the processor.
The server must understand the syntax of the device it is connected to. You need only create a tag if you want to browse the server.
Examples of OPC servers include RSLinx Classic and KEPServer Enterprise. For information about creating tags in OPC servers that have their own tag database, see the documentation provided with the server.
For information about creating tags in a Logix 5000 processor, see the documentation for your device programming software.
2. Create a data server in FactoryTalk View, if your application does not already have one. Every new FactoryTalk View Machine application includes a FactoryTalk Linx data server automatically.
For more information, see Set up communications on page 81.
3. In graphic displays, data log models, or anywhere else you want to use a tag’s value, create a direct reference to the tag. At runtime, the tag’s value is passed to the graphic display or data log model.

When to use HMI tags

Use HMI tags to manipulate tag data and to store tag values in the runtime computer’s memory.

Scale, offset, or provide a range for data

Use HMI tags if the data server you are using does not provide for:
• Scale or offset a value.
• Set minimum or maximum limits on a value (that is, providing a range of values).

Scale and offset

The scale and offset modify the raw data that comes from and goes to the programmable controller before the data is saved in the computer’s memory (called the value table). The scale and offset also modify the value specified in FactoryTalk View before it is written to the programmable controller.
The scale is a multiplication factor — the value from the programmable controller is multiplied by the scale.
The offset is a fixed value — after the value from the programmable controller is multiplied by the scale, the offset amount is added.

Minimum and maximum

HMI tags allow you to set a minimum value and a maximum value that can be written to the programmable controller or server.
These values do not affect what is read from the programmable controller or server.
For example, if you specify a minimum of 0 and a maximum of 100, FactoryTalk View would be able to read a value of 200 from a programmable controller and store it in the value table, but would not be able to write this value to the programmable controller.

Store values in FactoryTalk View memory

A memory tag can be used to store values without the need for an attached or accessible device.
For example, you might need to store a value in memory:
• To store the result of a calculation.
• Temporarily, for example, a counter or index.
• To maintain information about the system’s current state, for example which graphic display was last opened.

Use HMI tags

To use HMI tags
1. In the Tags editor in FactoryTalk View, create a tag. HMI tags can be used as an internal storage location. Optionally you can map the tag name to an OPC tag or device address.
2. For more information, see Use HMI tags on page 103.
3. In graphic displays, alarm triggers, or anywhere else you want to use a tag’s value, assign the tag. At runtime, the tag’s value is passed to the graphic display or alarm system.

Use the Tag Browser

In FactoryTalk View, when you need to use a tag, you can type its name and path, or you can browse for it.
Use the Tag Browser to:
• Browse the tag database and select a tag or folder from the editor you are working in
• Edit or add an HMI tag
• Add a folder
• Import tags from PLC databases into the project’s tag database
• Create a backing tag or structure tag for use with controller instruction faceplates
The Tag Browser is divided into two sections. The left side shows the hierarchy of the folders for the HMI tag database. Each device shortcut (in FactoryTalk Linx) or OPC topic (in RSLinx Classic) is represented by a folder.
Tip:
• In addition to toggling the display of data server names, the context menu for the left-hand pane also lets you refresh the folder display, add new HMI folders, and move the cursor to the home area in the folder hierarchy.

To open the Tag Browser
Use one of the following methods:
• In the editors that uses tag assignments, click the Browse button in the Tags column.
• In the Expression editor, position the cursor where you want to insert a tag name, and then click Tags.
• In the Parameters editor, double-click where you want to insert a tag name.

Show server names

By default, the Folders pane in the Tag Browser shows folders, but not the servers they belong to. You can show the names of servers that have been set up in the application.
Folders of data server tags are listed under the data server, to which they belong. Below the data servers, the application is listed as an HMI server, with folders of HMI tags under the application name.

Browse for off-line tags

For each FactoryTalk Linx device shortcut or each RSLinx Classic OPC topic in your application, an Offline folder and an Online folder are shown in the Tag Browser.
In FactoryTalk Linx, you can use the Offline folder to browse tags in an RSLogix.acd file. For details about making the .acd file available to browse offline, see FactoryTalk Linx Help.
In RSLinx Classic, you can use the Offline folder to browse tags in a PLC program stored on disk. If the OPC topic in RSLinx Classic has access to symbols, you can browse for them in the Offline folder.

Use tags and expressions in your application

Once you have created tags (either in data servers or in FactoryTalk View), assign them to connections in your application to allow the application to interact with the data source and perform actions based on the tag values.
You can assign tags in these editors:
• Expressions
• Global Connections
• Graphic Displays
• Global Object Displays
• Graphic Libraries
• Parameters
• Alarm Setup
• Information Setup
• Macros
• Data Log Models
• RecipePlus Editor

Assign tags
This example shows the Trigger dialog box that opens when you click the Add button on the Triggers tab of the Alarm Setup editor:
Assign tags to graphic objects
Use expressions to manipulate tag values
Substitute tag names used in graphic objects
Log tag values
Use macros to assign values to tags

Use HMI tags

• HMI tag types
• How to use the Tags editor
• Data sources
• Address syntax for device tags
• How to organize HMI tags
• How to view tag statistics
• Other methods for creating HMI tags
• How to import HMI tags

HMI tag types

• Analog tag stores a numeric value from a range of values defined for the tag. Use them to represent devices that can have a range of values such as temperature, pressure, flow, or the position of a rotary control.
• Digital tag accepts any numeric value. Zero will be written as False (0) and any non-zero number will be written as True (1). Use them to represent devices that have two states: on or off, such as switches, contacts and relays.
• String tag stores ASCII strings that can be a string of characters or whole words. The maximum size string allowed is 82 characters. Use string tags to represent devices that use text, such as a bar code scanner that uses an alphanumeric product code.
In addition to the tags you create, the application provides a set of system tags. System tags store information generated while the system is running, such as the name of the logged-in user, system time and date, and the like.

Analog tags that use floating-point values

You can assign analog tags to most of the connections in FactoryTalk View, including both HMI and data server tags. If the analog tag uses a floating-point data type but an integer value is required, the floating-point value is rounded.

• Floating point values are rounded to a maximum of six digits. Therefore, using a floating-point data type and adding to it a value that exceeds the six significant digits will result in a rounding error. For example, adding any number to 999,999 will result in a rounding error.
Tip:
Floating point values (the default values for numeric input objects) are rounded to six digits. Therefore, using a floating point data type and adding to it a value that exceeds the six significant digits will result in a loss of precision.
This rounding method is also used for Numeric Input Enable buttons that use the implicit decimal position if an integer tag is assigned to the button’s Value connection. For more information about the Numeric Input Enable button, see Help.

Use the Tags editor


You can create tags:
• by importing them from an existing tag database

When you do searches, remember that the backslash in a folder name counts as a character in the tag name.

Data sources

When creating an HMI tag, you must specify a data source. The data source determines whether the tag receives its values externally or internally.

Device

A tag with device as its data source receives its data from a source external to FactoryTalk View. The data can come from a programmable controller or other device via FactoryTalk Linx, or from another OPC server. You can use up to 5,000 device tags.
For analog tags with Device as the data source, the data type determines the format used when reading and writing tag data to the data server.
Do not create HMI Tags that are pointing to a System Tag. When a project contains an HMI tag pointing to a System Tag, users may fail in creating an MER or have runtime performance issues.

Memory

A tag with memory as its data source receives its data from (and stores values in) the FactoryTalk View internal value table. Tags with memory as the data source do not count toward the total tag limit.
For analog tags with Memory as the data source, select the data type that matches the format of the data you will store in the tag. Choosing Default is the same as choosing Floating Point.

Address syntax for device tags

For device tags, you must provide the address and path to the OPC server that is connected to the data source. For example, the OPC server could be connected to a device such as a programmable controller.
The syntax for OPC tag addresses is:
[AccessPath]Address
or
::[AccessPath]Address
where :: indicates that the address resides in a data server in the application. The two colons are necessary when the address contains a colon, for example, N7:0.
The square brackets are part of the syntax. They do not indicate optional parameters.
The access path is one of the following:
• For communications with a FactoryTalk Linx data server, the access path is the name of the device shortcut in FactoryTalk Linx.
• For communications with an RSLinx Classic OPC server, the access path is the name of an OPC topic in RSLinx Classic.
• For communications with other OPC servers, the access path might be optional. For information about the syntax for the access path, see your OPC server documentation.

Example: Logix 5000 addressing

We recommend that you use the Tag Browser or Find and Replace to select OPC items. When you use the Tag Browser the correct syntax and data types are selected automatically.

OPC topic and item addressing

Logix 5000 uses this addressing syntax:
[Device shortcut]item name for FactoryTalk Linx.
[OPC topic name]item name for RSLinx Classic.
In this example, the FactoryTalk Linx device shortcut name for the Logix 5000 processor is CLGX. To connect to an OPC item called Motor, type this address:
[CLGX]Motor
Bit level addressing
You can gain access to the bit level of an item that uses the integer data type by appending .# to the end of the tag address, where # is the number of the bit you want access to.
For example, to gain access to the first bit of the integer item Motor, type this address:
[CLGX]Motor.0

Organize HMI tags

Organized tags make finding and using tags faster and simpler. To organize your tags, try these tips:
• Establish naming conventions.
Naming conventions enable you to use wildcard characters most effectively when searching for and showing tags during development.
• Use folders to group related tags.

Name tags

A tag name can be up to 255 characters long including folder name. If you create a folder, the folder name becomes part of the tag name. The backslash (\) after a folder name counts as a character.
A tag name can contain these characters:
• A to Z
• 0 to 9
• underscore (_) and dash (-)
A tag name cannot contain spaces.
A tag name can be mixed case. A tag name preserves upper and lower cases for readability but is not case sensitive. For example, the tag name MixerValve1 is the same as mixervalve1.
When a tag name starts with a number or contains a dash, enclose the name in curly brackets { } when you use it in an expression, for example, {N33-0}.

Use folders to group tags

To organize tags, create a folder to store tags that are related to one another. To separate the folder name from the rest of the tag name, use a backslash (\). For example, tags in the folder called Pump would start with Pump\.
For greater organization, you can nest folders. For example, you can organize the HMI tag database first by area, then by machines in the area, and finally by devices in each machine. The result might be Area1\Machine1\Pump.
To create similar groups of tags quickly, create one folder with its tags and then duplicate the folder.

View tag statistics

The Tag Statistics dialog box provides the following information for the current database:
• HMI tag database path
• The ODBC data source
• The date the tag database was last modified
• The number of analog, digital, and string tags
• The total number of HMI tags
• The number of folders in the database

To view tag statistics
• With the Tags editor open, from the View menu, select Tag Statistics.

Create tags as needed in the Data Log Models editor


Import tags from a PLC database
Use the Import PLC Tags dialog box to selectively import tags from a PLC or other database into your application’s HMI tag database. Tags imported in this way are copied into the database. They are not shared with the source database. This means changes to tags in your application do not affect the database from which they have been imported, and vice versa.
You can import tags from any of these databases:
• RSLogix 500® internal database, with file extension .rss
• RSLogix 5 internal database, with file extension .rsp
• RSLogix 5 or RSLogix 500, saved as an external database, with file extension .ctd (before importing, explicitly export to the .ctd format to be sure of including the latest changes)
For PLC and SLC addresses, the Import PLC Tags dialog box shows only addresses that are used in the symbol or address list of the PLC programming software.

Use the Tag Import and Export Wizard

You can also import PLC or SLC databases into FactoryTalk View using the Tag Import and Export Wizard.
You can use the wizard to:
• Export your application’s tags to a .csv file.
• Import tags from another FactoryTalk View application’s tag .csv file.
• Merge tags from another FactoryTalk View application (that is, import them directly from the application, without first creating a tag .csv file).
• Import tags from RSLogix 5 or RSLogix 500, saved as an external database, with file extension .ctd (before importing, explicitly export to the .ctd format to be sure of including the latest changes).

Start the Tag Import and Export Wizard

• In FactoryTalk View Studio, from the Tools menu, select Tag Import and
Export Wizard.
• From Windows Start menu:
• (Windows 10 and Windows Server 2016) Select All apps > Rockwell Software > Tag Import and Export Wizard