Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Add carriage return when communicating via USB

Hi all,


so i've run into a problem where i need to add a carriage return (\r\n) to the end of all my commands in my VI.  I've been trying to figure out how to do this.  I found this , which gives a general idea of how do such a thing, but that is for serial connections.  


I made a property node, with TermChar En set to True, and TermChar set to '5'.  what do I hook up 'reference' to, because if I connect it to my resource name in my VI, the property node turns into the device-specific node, with different inputs/outputs.


Any ideas?

0 Kudos
Message 1 of 8

use string concatenate with a second string that contains CRLF or in /mode /r/n

greetings from the Netherlands
0 Kudos
Message 2 of 8

what strings would i concatenate though, since I need to add the return for every command

0 Kudos
Message 3 of 8

I think a better way to phrase my question is, how do I go about adding that to all the commands?  I'm new to labview so it would be great if you had a step-by-step or a screenshot to help

0 Kudos
Message 4 of 8



You now probably call a vi that sends data to the usb port.

Replace that vi by a subvi that does the same but also adds the CRLF combination before sending.

greetings from the Netherlands
0 Kudos
Message 5 of 8

well what I am doing is running the example VI that came with the drivers.  The example VI's just goes down and calls a series of VI that came with the labview drivers, so I'm not sure if i can (or how) get to the part thats writing to the USB.


Is there something I can add to the main VI which would add CRLF to all the write strings?

0 Kudos
Message 6 of 8



Which instrument driver are you talking to, maybe I can have a look at it.

greetings from the Netherlands
0 Kudos
Message 7 of 8

I'm using a sorensen xg300 DC power supply.  Here is the download link to the drivers for that series of power supply:


Thanks so much for your help Albert



0 Kudos
Message 8 of 8