LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smart open.vi - MyRio

Solved!
Go to solution

Hey guys,

 

I got a question about the smart open.vi

Its a vi used in combination with the MyRio.

 

The programmed vi we use worked for month and has no grat problems with the smart open.vi so far. I once had an syncronization issue within the smart open.vis, which was solved with a mouse klick. The same issue suddenly appeared yesterday and was "fixed" again.

 

However the smart open.vis (analog and digital) are not working as they should (no information, e.g. temperature from thermo elements are received; or can be sent / controlled , e.g for heating cartridges).

--> neither the MXP Connectros A & B nor the MSP Connector C is working anymore

 

Restarting the Rio over the IP in the browser didnt help.

 

I sent you some pictures for an better overview - didnt find the error online.

 

The error in the programm is niLvFpga_Open_myRIO-1900.vi - Error -52005

and after opening and running the smart open.vi only, it returns the Error -363010 AI.lvlib:Smart Open.vi

 

Im not sure how to fix the issue. Is it "only" a syncronization error or something else?

The last time the vi worked was last week. I didnt work on the vi for about a week and went yesterday back to university and it suddenly returned the "sync" probem (fixed, see above) and the attached errors. There was nothing changed in the vi or the Rio.

 

 

Error_RIO.PNG

 

Smart-open.PNG

 

 

Thanks for your ideas and help

Greetings Samuel

Download All
0 Kudos
Message 1 of 7
(2,443 Views)

Samuel,

     When a colleague or student asks me "Why doesn't my LabVIEW program work?", they usually show me their LabVIEW Program (which means they open the Project, open the VI in question, and show me the Block Diagram, in LabVIEW, so I can move around, open Case Statements, etc.).  But (sadly) many times the code is a mess -- wires everywhere, no sub-VIs, need 6 monitors to see it all at once, and so on.

     So I say "What is this supposed to do?"  They start explaining the code, and I say "No, you are telling me how you are doing it -- I want to know what you are trying to do."  I hope you see the difference.

     So, first, take your myRIO Project and compress it into a .ZIP file.  Then reply, telling us what you are trying to do (so we can understand the purpose of the code), and attach the .ZIP file with the entire Project.  To help us understand it, also explain how the myRIO is hooked up to whatever you are using it to do.  Also, what was happening when the Errors you show occurred.

 

Bob Schor

Message 2 of 7
(2,416 Views)

Hey Bob,

 

thanks for your answer. I thought at this kind of problem, the project is not needed. Forgive me for the inconvenience.

I hope i´ll answer your question to your fullest satisfaction.

The project is attached.

 

We want to investigate adhesive properties. Therefore a temperature system is needed.

 

To explain it (hopefully) easy: We set up a target temperature profile that shall be run down (there are different settings the user can use). For this our MyRio is connected to Thermocouples. Due to the returned data of the thermocouples, the programm continually compares the target temperature with the actual temperature. Depending on whats the case, the MyRio targets the heating cartridges or nitrogen cooling - that are also connected to the Rio - to fix the temperature difference and enables a stable temperature control. That is in general. The Vi itself worked so far. We did already some test measurements.

 

Overview:

The MyRio is connected to

  • three Thermo couples (MXP Connector A)
  • one nitrogen cooling (MXP Connector A)
  • two heating cartridges (MSP Connector C)
  • one signal for temperature profile (MSP Connector C) 

 

The main problem is now, that the MyRio is not doing anything. It neither returns (or receives?) the temperature of the thermo couples nor is sending the information to the heating cartridges / cooling. (the connections are still the same and intact).

The programm identifies the Rio (otherwise we couldnt start the programm) however the MyRio behaves like it is not connected to the Vi. It is strange.

 

--> The returned temperature for all thermo couples is -100°C, that is the value for an Voltage of 0 V (the maximum is 5 V)

 

-->

(1) Normally if the vi is running and the nitrogen cooling is off, the LED is NOT shining (it is shining when the cooling is active).

(2) On the other side, if the MyRio has energy but the vi not running, the LED is shining (It seems there is an automatically default output).

(3) In this case, the LED shines continually when the vi is running even if the nitrogen cooling is offline (there should be no output and no shining LED) as if there is no connection between LabView and the Rio.

 

This is the result of the occuring Smart open.vi error

(hopefully i described it understandable)

 

And I hope the project is not a 100% mess haha, i am still relatively new but tried my best.

The project name and main vi name are both "temperiersystem" 

 

Greetings and a nice evening

Samuel

0 Kudos
Message 3 of 7
(2,401 Views)
Solution
Accepted by Suryoyono

I'm going to put on my Professor Hat and give you a number of suggestions that will, I hope, improve your experience with LabVIEW.

  • I recommend that you put every LabVIEW Project (meaning the .lvproj file, the Top Level VI, and all of the sub-VIs and TypeDefs that the Project uses) in a single sub-Folder of your LabVIEW Data folder.  That was what I meant by "compress the Project Folder -- I didn't mean the entire LabVIEW Data Folder (I should have been clearer about this ...).
  • Try to make the LabVIEW Project "inclusive".  Opening the Project, it looks like you have only a single VI, Tempieriersystem.  However, your Project also includes Datenspeicherung_MA, LED - Farbe (SubVI), several Standard-PID routines, a bunch of Zähler VIs, and others that should be listed, and in the same Project Folder (perhaps even in a sub-Folder called, say, Sub-VIs) as the Top Level VI and the Project file.
  • Try to make the LabVIEW Project "hierarchical".  When you open the Top Level VI, you shouldn't see "every little detail of everything that needs to be done".  Instead, you should see the broad outline of what you want to do, with the details "hidden" in sub-VIs.  I work very hard to keep all of my Block Diagrams to the size of a Laptop screen -- the result is that I have several hundred (or even thousand) VIs (and TypeDefs) in a Project, but the Top Level VI and all of the sub-VIs fit on a single screen, and can be explained and understood in a matter of minutes (because the "messy details" have been "hidden" in sub-VIs.
  • Look at your code, and see where you can simplify (and "hide" in a sub-VI).  I'll give you an example:  In the second Smart Open, there is a Read.vi that returns an Array of 4 values.  Pass this Array to a sub-VI that returns 4 results.  Look at what you are actually doing -- you use Index Array to output each Array Value, do the same calculation on each one, and return 3 (not 4!) values that you'll use somewhere else.  What you want is a For Loop with an Indexing Tunnel in, the single operation of Coerce, Multiply, and Subtract (all using the same numbers), and outputting through a second Indexing Tunnel.  [If you choose to ignore the fourth value, that's fine].
  • Look for other places you can "hide the details".  Note when you start making sub-VIs, you'll need to recognize them when you put them on your Block Diagram, so you'll need to learn how to use the VI Icon editor.  I recommend using a simple Box icon with 2-3 (short) lines of Text, such as "Temp Range", to describe what the sub-VI does.

But now to your problem with the Smart Open.  Create a new Top Level VI, "Test Smart Open".  Take one of your sets of Channels, do a Smart Open, a Read and show Result (or a Write a Known Value),  I don't know how your Devices are clocked (if they are programmed to do a single Read or Write and are running at the rate of the Timed Loop, or whether they have an inherent Sampling Rate in addition to the repetition by the Timed Loop), but you should initially start without the Timed Loop and just do it once.  If it works, see if you can do several devices, and then add the Timed Loop.  Don't worry, at first, about data processing -- get the data working first, with much simpler code.

 

Bob Schor

 

Message 4 of 7
(2,388 Views)

Hey Professor Bob,

 

thank you for our reply and forgive me for the delay. I was not at home for a week.

I´ll be in university next week and will try to follow your steps and suggestions. Thank you so far for taking your time and really trying to help. Hope I will reply with a positiv feedback

 

Greetings Samuel

0 Kudos
Message 5 of 7
(2,364 Views)

@Suryoyono wrote:

thank you for our reply and forgive me for the delay. I was not at home for a week.


"Patience" is my middle name (not really ...).  I hope my suggestions to "make a small test and get that working" gets you going.

 

Bob Schor

Message 6 of 7
(2,354 Views)

Hey Bob,

 

finally my answer. Thanks for your patience haha, hope you´ll grow in it 🙂

 

Your suggestion was good. We tested the Rio in the I/O Monitor Help and also built the little Vi. Both went without errors. The connections worked and we got the wanted results. An example screen of the I/O monitor.

 

Thermoelement.PNG

 

The AI0 was connected and it showed the expected Values. AI1 was not connected and continually at 5V (expected).

In this Case I knew the problem was not with the Rio but the Temperiersystem vi.

 

And I found the solution in the help menu after researching a bit (actually I dont know why it worked the last months haha but it did). However the fixing of the error was just replacing the SmartOpen.vi with Open.vi

 

FIX.PNG

 

I added the close.vi but did not replace the Smart Open.vi with Open.vi

So it was kinda a mix of both figures shown in the picture. That was the whole problem in this case. But as mentioned I dont know why it worked so far without problems. However it works now.

 

Thanks Bob for all the suggestions and professor tips you gave for the Code. I hope the Kudos and marked as a solution will give at least a little "thank you-feeling". I really appreciate your detailed answers and helpful tips.

 

I wish you a great week and may you help many more people with their LabView Problems haha.

Stay healthy Sir

 

0 Kudos
Message 7 of 7
(2,324 Views)