Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

i!-time manager

Bonjour

I tried to insert i!-Time Manager in my program without succes.

I tried to run it in a new empty axs file to know it it works but I got no succes too.
I f somebody can help me?

Follow, is the axs file with I tried do work
PROGRAM_NAME='Time manager'
(***********************************************************)
(***********************************************************)
(*  FILE_LAST_MODIFIED_ON: 04/05/2006  AT: 09:00:25        *)
(***********************************************************)
(* System Type : NetLinx                                   *)
(***********************************************************)
(* REV HISTORY:                                            *)
(***********************************************************)
(*
    $History: $
*)
(***********************************************************)
(*          DEVICE NUMBER DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_DEVICE

vdvTmEvents       = 33001:1:0
dvTmTimeSync      = 0:3:0

(***********************************************************)
(*               CONSTANT DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_CONSTANT

(***********************************************************)
(*              DATA TYPE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_TYPE

(***********************************************************)
(*               VARIABLE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_VARIABLE

(* Timezone *)
CHAR    dTmTzName[100]
CHAR    dTmTzDesc[10]
DOUBLE  dTmTzGmtOffset
CHAR    strTmTzDstRules[1000]

(* Location *)
CHAR    strTmLocName[100]
DOUBLE  dTmLocLong
DOUBLE  dTmLocLat

(* Timeserver *)
INTEGER nTmTsProtocol
INTEGER nTmTsCheckTime
CHAR    strTmTsServer[100]
(***********************************************************)
(*               LATCHING DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_LATCHING

(***********************************************************)
(*       MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW           *)
(***********************************************************)
DEFINE_MUTUALLY_EXCLUSIVE

(***********************************************************)
(*        SUBROUTINE/FUNCTION DEFINITIONS GO BELOW         *)
(***********************************************************)
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)

(***********************************************************)
(*                STARTUP CODE GOES BELOW                  *)
(***********************************************************)
DEFINE_START

DEFINE_MODULE 'i!-TimeManagerMod' mdlTm(vdvTmEvents,
					dvTmTimeSync,
					dTmTzName,
					dTmTzDesc,
					dTmTzGmtOffset,
					strTmTzDstRules,
					strTmLocName,
					dTmLocLong,
					dTmLocLat,
					nTmTsProtocol,
					nTmTsCheckTime,
					strTmTsServer)



(***********************************************************)
(*                THE EVENTS GO BELOW                      *)
(***********************************************************)
DEFINE_EVENT

(***********************************************************)
(*            THE ACTUAL PROGRAM GOES BELOW                *)
(***********************************************************)
DEFINE_PROGRAM

(***********************************************************)
(*                     END OF PROGRAM                      *)
(*        DO NOT PUT ANY CODE BELOW THIS COMMENT           *)
(***********************************************************)



With tis code I get this error

Starting NetLinx Compile - Version[2.4.0.1] [10-29-2008 12:02:09]
C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.axs
ERROR: C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.tko(0): L20222: i!-TimeManagerMod.tko is not a valid module
C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.axs - 1 error(s), 0 warning(s)
NetLinx Compile Complete [10-29-2008 12:02:10]

If I try to build system or compile the module itself I get this error

Starting NetLinx Compile - Version[2.4.0.1] [10-29-2008 12:57:23]
C:\Documents and Settings\Denis\Bureau\AMX test\Modules\i!-TimeManagerModTest.axs
ERROR: C:\Documents and Settings\Denis\Bureau\AMX test\Modules\i!-TimeManagerModTest.tko(0): L20203: Circular reference for module name [i!-TimeManagerModTest] while processing module [i!-TimeManagerMod.tko]
C:\Documents and Settings\Denis\Bureau\AMX test\Modules\i!-TimeManagerModTest.axs - 1 error(s), 0 warning(s)
NetLinx Compile Complete [10-29-2008 12:57:24]

Starting NetLinx Compile - Version[2.4.0.1] [10-29-2008 12:57:24]
C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.axs
ERROR: C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.tko(0): L20222: i!-TimeManagerMod.tko is not a valid module
C:\Documents and Settings\Denis\Bureau\AMX test\Time manager.axs - 1 error(s), 0 warning(s)
NetLinx Compile Complete [10-29-2008 12:57:25]

>>>>--- NetLinx Compiles: 2 Files 2 Total Error(s) 0 Total Warnings(s) ---<<<<

Comments

  • Can you compile the I-timemanager as it is installed by the AMX installer? It's under AMX Control Disk/Solutions/iTimeManager.
  • mritzmritz Posts: 22
    Maybe the module file i!-TimeManagerMod.tko has corrupted data. I looked at the file size, it is 242 kB on my module file. When I try to compile your code "Time manager" everything works fine. And it looks that your compiler finds your module file, because otherwise it would report an error "File [ i!-TimeManagerMod.tko ]could not be found"
  • DenisDenis Posts: 163
    Yeeeesssssssssssssssssss!

    Thanks guy!

    Now the compilator dosen't error messages, but the module seem to dosen't works.

    I read in an other post, as I need a DNS address, somebody know how I can do that if I don't have a DNS server?
  • Many times you can use the gateway address for the DNS address because the router (gateway) probably registered a DNS on the internet. I loaded the iTimemanager from AMX and it seems to work fine. I'd try down loading it again. Just so that I understand. iTimemanager just sets the controller clock and gives you triggers for sunrise, sunset, DST and some other triggers. Right?
  • DenisDenis Posts: 163
    Right.

    My goal is to set an automaic DST feature in the program. I bid on a new job where the client ask to me if he will can set an alarm clock with tuner and opening curtains. ( and I told yes :D)

    Now I have to build an alarm clock. Due to my lack of experience it's a chalenge each time as I program a new system.

    Welcome in this wonderful word of automation! :)
  • viningvining Posts: 4,368
    Open NS2 and click on "diagnostics" scroll to the bottom and click "Network Addresses" on the pop up click on "Get DNS Information". Most likely you have nothing entered so enter the IP address of your gateway router and click "Set DNS Information" & reboot.

    When you compile and upload a new program enable "Diagnostics" as soon as you can. You'll have to keep trying until you can connect in order to see the start up sequences and at some point you should see the attemp to connect and retrieve data from the NTP server. If you're having DNS issues it will say that it is unable to resolve DNS name or something to that affect. Either way watch the diagnostics and see what happens.

    There's also i! Scheduler that alot of folks use to schedule events which may already include the time manager features and also provide you with the scheduling features you need for the alarm clock and shades. I've never used it but some here on the forum have to controll HVAC, lighting and I would imagine audio for alarm clock type feature like you desire.

    If you have the time I would recommend writing your own code to handle the scheduling since it isn't all thast difficult, just time consuming.
Sign In or Register to comment.