LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1073807339 VISA READ TIME OUT

Solved!
Go to solution

Hi Seabass,

 

apart from the valid comments on the datatype of your TermChar and message length:

  • always show the display mode indication for string constants!
  • use correct datatypes to avoid coercion dots (like on that Wait function)
  • right-click the border of the error cluster constant and choose Autosizing->Arrange vertically
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 20
(961 Views)

@crossrulz wrote:

@Seabass666 wrote:

I changed the read Byte count into 20 and it worked.


But your message is at least 28 bytes.  So you are not getting all of your data.

 

I think you have an issue with where you are setting the Termination Character.  There is a coercion dot on the property node, telling me you are not casting your Line Feed constant into a U8 like is expected.  You are likely casting to a I32, which will be coerced to 0 (would have to test to verify).  Change that constant on the Type Cast to be a U8 representation.


This is exactly right - another question had exactly this problem. It's much easier to go ahead and just use the Configure Serial Port VI as GerdW suggested (at least, that's what I understood was the suggestion).

 

Your write commands may also be sending the end character twice (actually, I think you're trying to send this, but you need to set Message Based Settings > Send End Enable to true to have it pay attention to the ASLR End Out (and then you don't want to add \r or \n to your writes - they'll be "automatically" appended)).

 

The Configure Serial Port is much simpler and defaults to a Termination Char of LF on Reads (nothing for Writes), which then allows use easily with the code I suggested earlier (manually appending LF to your writes, large number of bytes for the Reads).

Note string constant display style (\)Note string constant display style (\)


GCentral
0 Kudos
Message 12 of 20
(958 Views)

@crossrulz wrote:

I think you have an issue with where you are setting the Termination Character.  There is a coercion dot on the property node, telling me you are not casting your Line Feed constant into a U8 like is expected.  You are likely casting to a I32, which will be coerced to 0 (would have to test to verify).  Change that constant on the Type Cast to be a U8 representation.


And here is the proof...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 20
(948 Views)

I tried your suggestions, and this is what it got.

Are these what you mean? Or do I misunderstand some?

微信截图_201908201457301.png

0 Kudos
Message 14 of 20
(935 Views)

Hi Seabass,

 

I tried your suggestions, and this is what it got. Are these what you mean?

No!

You don't need this constant/TypeCast/PropertyNode at all!

Set any inputs (if needed, aka "different from default") at the SerialPortInit…

 

Or do I misunderstand some?

Still no display mode visible at all those string constants…

Still no autosizing for the cluster constant…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 20
(931 Views)

If you double click on the Configure Serial Port VI, you'll see the values that are already set for you. You may need to right click on the property node and chose Name Format > Short Names (or similar) to get what you see on the main VI. Make sure not to save and overwrite your vi.lib version.

 

Regarding the typecast, firstly, you don't need it at all, but secondly, no - right click on the numeric constant and change representation to U8. The example crossrulz posted shows the difference, but if you place the two side by side you'll also see the change between typecast to U32 and then to U8 vs to U8 directly.

 

As a follow-up point, the display style visibility that GerdW has mentioned a couple of times is set by right clicking on a string constant (similar process for numerics) and then going to Visible Items > Display Style. 


GCentral
0 Kudos
Message 16 of 20
(930 Views)

@Seabass666 wrote:

Are these what you mean? Or do I misunderstand some?


Just completely get rid of that VISA Instrument Property Node.  The VISA Configure Serial Port has all of the default values you need, so you just need to call it as you have and then you are ready to write to and read from your instrument.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 17 of 20
(922 Views)

Thank you all!

 

I fixed it and the program worked.

 

微信截图_20190821135542.png

0 Kudos
Message 18 of 20
(905 Views)

Hi Seabass,

 

still a coercion dot for that "byte count" constant.

 

Basic LabVIEW knowledge: right-click at a VI/function in-/output and choose Create->control/indicator/constant with correct datatype!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 20
(900 Views)

Hi Seabass666,

If you need any more help with the Razorbill RP100, please feel free to to contact the company directly. We'd be interested in learning about your labview script too! https://razorbillinstruments.com/contact/

 

0 Kudos
Message 20 of 20
(866 Views)