Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

communication delay

sir or madam,

    recently,i program a system for a FCT which belongs to instrument control.and in the debug,i find a strange problem.yeach,everytime the main program calls the serial basic W/Read VIS,there is 5s even 6s delay unwanted.and i run the serial basic W/Read VIS,it does work well without the delay.no matter where and when,as long as the main program calls the VIS,it'll delay.

so i'm confused.and any ideas is appreciate.thank you!

0 Kudos
Message 1 of 3
(3,104 Views)

I don't understand what your attached VI has to do with the exxample you mention. Does this VI read anything or do you get a timeout error? Why have the wait inside of a for loop? Why are you using the VISA Bytes at Serial Port when you have the termination character enabled? Are you really trying to do modbus communication? If so, why aren't you using the modbus library? If you are using this as a subVI, then you should not be doing the initialize and close here. They belong in the top level VI. If you are using this as a subVI, then you really need to attach the top level VI.

0 Kudos
Message 2 of 3
(3,083 Views)

yeah,thank you for your replying.the reason why i attached the VI is that as i described,the main program delays here for 5s/6s.

and,the reason why i don't use modbus libray is that i just need W/Read only once.and use the basic serial W/Read VI is simple to understand,and make the program simple.the delay why i use the for loop is that some other engineer told his experience.

and through the whole day checking it,i sovled the problem.in my main program,there is a count time VIS.and when  i shield it,the whole program runs well with no delaying.

so thank you all the time.

0 Kudos
Message 3 of 3
(3,074 Views)