LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I add or replace string constants for input into VISA Read?

The template program I am using has a string constant that feeds into VISA Write to control a motor. However, if I try to replace that string constant with a new string constant, VISA Read no longer accepts the new constant and returns an error of,
"Error -1073807339 occurred at VISA Read in SM_Command.vi
Possible reason(s):
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."
It doesn't make sense because I can replace the old, working string constant with the exact same information in a new string constant and it still won't work. I have attached the file with the string command in the block diagram. If that were to be replaced with a new string constant, the program
would not work. Help.
0 Kudos
Message 1 of 16
(3,770 Views)

Hello Johnny,

Are you also including the carriage-return at the end in the new string? If you right-click on the constant and select '\' Codes Display from the popup menu, you will see the \r at the end. Does your new string have this?

Regards,

Khalid


Message 2 of 16
(3,769 Views)

hello ... I have the same problem when I send a single string to theengine so @ 16 \ S177 \ s40000 \ s833 \ s8333 \ s0 \ s0 \ r I gainand move the motor. But when I read a series of data in this sameway give me a notepad parks the same mistake VISA Read in SM_Command.vi code -1073807339, let me know if youhave some form of solution

0 Kudos
Message 3 of 16
(3,358 Views)

The string you posted "@ 16 \ S177 \ s40000 \ s833 \ s8333 \ s0 \ s0 \ r" has spaces after the backslashes.  "\ s" does not result in a "space"

 

Make sure that any string constant or control is set to '\ Codes Display'.  If that does not solve the problem, please post your code along with typical data and a clear indication of what is wrong and what the expected result should be.

 

Lynn

0 Kudos
Message 4 of 16
(3,354 Views)
hello, if I do not understand spomgo no space, turn it into a normal string but it generates the same error. Here I send the program inlabview and notepad where you capture the movements ..

Thanks for your help
Download All
0 Kudos
Message 5 of 16
(3,350 Views)

You are not sending spaces.  You are sending the backslash character followed by the "s" character.  Similarly, you are not sending carriage returns art the end.

 

You need to convert the "\s" and "\r" character pairs in your file to actual space and carriage return characters before writing them to the serial port.

 

The '\ Codes Display' mode for a string indicator (which you are NOT using) does not change a string containing the '\' character to something else in the string.  It only gives you a "nice" way to look at characters you could not see otherwise.  Please read the help about string indicators.

 

Lynn

0 Kudos
Message 6 of 16
(3,343 Views)

Hi do not really understand what I want to explain. Bone should I deal with another set of string or copy \ s what happens is that the enginecode so I just abmite @ 16 177 4000 833 8333 0 0 r, that is what Iwant to send but adds labview \ sa all spaces. I should ahcer if you could be a little lighter would be better. the aplications is the motor Silver max the quick controls.

Thanks

0 Kudos
Message 7 of 16
(3,338 Views)

First, stop using a translator to convert your questions to English. It is doing a a poor job.

 

Second, read again what Lynn said. Your problem is with the text file - not LabVIEW. Your LabVIEW code is bad enough though. Do NOT use the run continous button.

0 Kudos
Message 8 of 16
(3,325 Views)

Sorry .. so far I am making this application of labview and thensought help there things that I do not understand ..

thanks

0 Kudos
Message 9 of 16
(3,322 Views)

Please guys Help me......

I'm trying to send data from a table in excel, serial port, so that I can command a quicksilver motor.
I made this code, but I could not even move the motor. I sent the application note. Please. Could you guide me a little?

0 Kudos
Message 10 of 16
(3,312 Views)