Two NI 700, One TP
I have a system with two NI 700's and one TP. These are connected over IP. On a button push I need to be able to to send strings to the 232 port's of both the masters, like power on of plasma's, make a route on a switch, control a xap etc. Any idea's on how to do this.
0
Comments
DEFINE_DEVICE dvDEVICE_1 = 5001:1:1 // Serial device on system 1 dvDEVICE_2 = 5001:1:2 // Serial device on system 2 dvTP = 10001:1:0 // Touch panel on system with the program DEFINE_VARIABLE // this is the dev array DEV dvDEVICE[]={dvDEVICE_1,dvDEVICE_2} DEFINE_EVENT BUTTON_EVENT[dvTP,1] { PUSH: { // This will send the string to both serial ports SEND_STRING dvDEVICE, "'STRING TO SEND TO BOTH'" } }JB
DEFINE_DEVICE dvDEVICE_1 = 5001:1:1 // Serial device on system 1 dvDEVICE_2 = 5001:1:2 // Serial device on system 2 dvTP = 10001:1:0 // Touch panel on system with the program DEFINE_VARIABLE DEV dvDEVICE[]={dvDEVICE_1,dvDEVICE_2} INTEGER nBUTTON_ARRAY[]={2,3} DEFINE_EVENT BUTTON_EVENT[dvTP,nBUTTON_ARRAY] { PUSH: { STACK_VAR INTEGER nBtnIdx // select system to send serial string too nBtnIdx = GET_LAST(nBUTTON_ARRAY) // Send to serial device on selected system only SEND_STRING dvDEVICE[nBtnIdx], "'STRING TO SEND'" } }JB
Thanks for the help, only one other question
How do you configure the masters for master to master mode?
Give each master a unique IP and system number. See tech note #348
In the URL list for one master, add the IP for the other master. See tech note #401
Done.
JB
Thanks for the help.