VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA viPrintf supported?

I am troubleshooting a problem with viRead/viWrite and I tried to use viPrintf to see if the problem exists with this function as well. I have a logic analyzer hooked up to monitor VXI bus cycles and I don't see any when viPrintf executes. NiSpy records the event as completed with VI_SUCCESS. Is viPrintf functional?
0 Kudos
Message 1 of 2
(7,743 Views)
The function viPrintf works a lot like the ANSI C console printf function, just with a bunch of instrumentation extensions.

The way it works the same is the way it affects you. All it does is buffer up the output unless you do one of the following:
1) Send "\n" in the format string itself (not in the formatted result)
2) Call viFlush(VI_WRITE_BUF) after viPrintf
3) Call viSetAttribute(VI_ATTR_WR_BUF_OPER_MODE,VI_FLUSH_ON_ACCESS) before viPrintf

Only when it flushes from the internal buffer to the bus will you see actual bus cycles.

Dan Mondrik
National Instruments
Message 2 of 2
(7,741 Views)