Testing A RS422 VCR WITH ACCENT3 PRO
Kouya
Posts: 60
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
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
0
Comments
You have the wrong device in your pushes
Also, the button feedback is taken care of in the System_Call file.
Thanks Can't believe I didn't catch it.
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