Home AMX User Forum NetLinx Studio

Testing A RS422 VCR WITH ACCENT3 PRO

Let me start I don't know Access so I used code wizard. I can see the channel push but no activity on the com port

PROGRAM_NAME='Vcr Test'
(***********************************************************)
(* FILE CREATED ON: 04/07/2011 AT: 19:51:13 *)
(***********************************************************)
(***********************************************************)
(***********************************************************)
(* FILE_LAST_MODIFIED_ON: 04/07/2011 AT: 21:33:46 *)
(***********************************************************)
(* System Type : *)
(***********************************************************)
(*
$History: $
*)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE

SVHS1 = 1
SVHS2 = 2
TP = 150

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

(* INFO *)
S_DATE = 'ENTER SAVE DATE'
S_TIME = 'ENTER SAVE TIME'

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

(* GENERAL *)
MASTER_MSG_BUFFER[100] (* BUFFER FOR 'MSG.LIB' *)

(***********************************************************)
(* LATCHING DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_LATCHING

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

(***********************************************************)
(* SUBROUTINE DEFINITIONS GO BELOW *)
(***********************************************************)


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

SEND_COMMAND SVHS1,'SET BAUD, 9600,N,8,1, DISABLE RS485'
SEND_COMMAND SVHS2,'SET BAUD, 9600,N,8,1, DISABLE RS485'

(* INFO *)
CREATE_BUFFER 0,MASTER_MSG_BUFFER
(* System Information Strings ******************************)
(* Use this section if there is a TP in the System! *)
(*
SEND_COMMAND TP,"'!F',250,'1'"
SEND_COMMAND TP,"'TEXT250-',__NAME__"
SEND_COMMAND TP,"'!F',251,'1'"
SEND_COMMAND TP,"'TEXT251-',__FILE__,', ',S_DATE,', ',S_TIME"
SEND_COMMAND TP,"'!F',252,'1'"
SEND_COMMAND TP,"'TEXT252-',__VERSION__"
SEND_COMMAND TP,"'!F',253,'1'"
(* Must fill this (Master Ver) *)
SEND_COMMAND TP,'TEXT253-'
SEND_COMMAND TP,"'!F',254,'1'"
(* Must fill this (Panel File) *)
SEND_COMMAND TP,'TEXT254-'
SEND_COMMAND TP,"'!F',255,'1'"
(* Must fill this (Dealer Info) *)
SEND_COMMAND TP,'TEXT255-'
*)
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(* {{NSX_DEFINE_PROGRAM *)
PUSH[SVHS1,50]
PUSH[SVHS1,51]
PUSH[SVHS1,52]
PUSH[SVHS1,53]
PUSH[SVHS1,54]

{
SYSTEM_CALL [1]'VCR6' (SVHS1,TP,50,51,52,53,54,0,0,0,0)
}

[SVHS1,50] = (1)
[SVHS1,51] = (1)
[SVHS1,52] = (1)
[SVHS1,53] = (1)
[SVHS1,54] = (1)
[SVHS1,55] = (1)
(* }}NSX_DEFINE_PROGRAM *)




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

Thanks
Brian

Comments

  • rdriederrdrieder Posts: 25
    Wrong Push Device

    You have the wrong device in your pushes
    Also, the button feedback is taken care of in the System_Call file.
    DEFINE_PROGRAM
    (* {{NSX_DEFINE_PROGRAM *)
    PUSH[TP,50]
    PUSH[TP,51]
    PUSH[TP,52]
    PUSH[TP,53]
    PUSH[TP,54]
    {
      SYSTEM_CALL [1]'VCR6' (SVHS1,TP,50,51,52,53,54,0,0,0,0)
    }
    
  • KouyaKouya Posts: 60
    rdrieder.

    Thanks Can't believe I didn't catch it.
  • cwpartridgecwpartridge Posts: 120
    The System Call doesn't need to be inside the push statements. It can be in the DEFINE_PROGRAM because the SYSTEM_CALL already has the appropriate PUSH statements defined.
  • KouyaKouya Posts: 60
    Guys.
    Thanks for your input I as able to check the vtr functions with the Accent3 Pro. But if I try the same program cable, vtr on a Ni3100 the vtr does not work. I can't figure it out.

    brian
  • rdriederrdrieder Posts: 25
    The pinouts on an Axcent3 Pro and a NI-3100 are the same. Check your baud rate.
  • ericmedleyericmedley Posts: 4,177
    Kouya wrote: »
    Guys.
    Thanks for your input I as able to check the vtr functions with the Accent3 Pro. But if I try the same program cable, vtr on a Ni3100 the vtr does not work. I can't figure it out.

    brian

    My guess is the baud rate command.

    On the old Axcent3 program, it was placed in the START section. This worked fine then but does not work now. Think about it, when the program gets running on the Netlinx master, the NI's device hasn't yet come online to receive the 'SET BAUD' command. So, in essence, it didn't get there to be obeyed. Put the SET BAUD command in a data_event[my_Serial_Port] > Online: and I'll bet you get it to go.

    Just a thought.
    e
Sign In or Register to comment.