LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automating Button Clicks

I would like to try all the other options before I rework a mostly functioning VI.    Generally I don't understand why the timing would create an error because it seems that this wouldn't affect the values used by terminals that aren't wired. Do you have any ideas as to where I could start looking for this error?

0 Kudos
Message 21 of 35
(985 Views)

I tried to set the event structure to be triggered when the  boolean indicator changed.  I attached the VI I used to try to make this timed indicator change occur, but it did not work.  Does this have something to do with how event structures work or is it simply just connected poorly?

 

EDIT:

After more time searching the internet I found that I have to use a "value signaling" property node, but I added this in and it did not help.

0 Kudos
Message 22 of 35
(977 Views)

This is the problem RavensFan was suggesting might be occurring (this example is heavily simplified, but hopefully describes the situation):

Example_VI.png

 


@jackson040 wrote:

Do you have any ideas as to where I could start looking for this error?


If you can provide the LLB or a download link for the (Omega?) platinum driver I'll take a look. I didn't find it with a quick search.


GCentral
0 Kudos
Message 23 of 35
(961 Views)

It will not work as you have it written. You are writing the value inside the event structure, but you never get inside the event structure. The easiest way using the approach that you're trying would be to put your timing logic and value signaling in another loop. 

0 Kudos
Message 24 of 35
(942 Views)

Thank you so much for all your help to this point!  I have attempted to move my timing into a different loop with a reference to that boolean inside the original loop.  I have attached the platinum LLB and my new VI below. With this move in the timing I am still getting the same error.

 

Thank you,

Jackson

 

Note: The llb is found by going through the folders

CNPT-Series_Software->platinum-modbus-driver->Platinum Labview Modbus Library.

Download All
0 Kudos
Message 25 of 35
(926 Views)

Regarding the Read events, you don't need to use the Value (Signalling) or any references - simply the top loop will do (because it takes the same action as the Read button - it generates a specific user event).

 

You should use a "Wait (ms)" node instead of the tick count to get the timing - the way you have it now will probably not work (imagine that the loop runs every 2 ms, and you get xyz999, xy(z+1)001 as your tick counts. Neither are multiples of 1000 but they span the time when you'd want to measure).

 

Nothing much to be said following a quick look through the platinum library code, so instead I'll ask a few more questions (no particular order, numbers for you to reference if you want in a reply)

  1. Can you use "Execution Highlighting" or Probes along with opening the block diagrams to determine when/if the VISA Resource Name changes value (presumably becoming empty?)
  2. Can you confirm that the Status LED becomes green when you click Open?
  3. If you click Close immediately afterwards (without using other buttons, and with the top loop disabled (you can use a Diagram Disable Structure)), does the error cluster remain empty?

GCentral
0 Kudos
Message 26 of 35
(919 Views)

I have taken the initial steps to fix the top loop.

1) I am not sure how to use execution highlighting at the moment.  I will update this reply when I am done going through the block diagrams.

2) I can confirm the light turns green when I click open.

3) The error cluster does remain empty if I click close immediately after clicking open. 

 

Thank you,

Jackson 

 

EDIT:  I went through the sub-VI's until I found the one that was reporting the error.  I couldn't figure out why this one was having issues writing the VISA name, but I did attach it below. 

0 Kudos
Message 27 of 35
(892 Views)

Another possibility...

 

When you open the Platinum_MB_SerRead.vi, there are a control and indicator with a bunch of values in a cluster (labelled SerHandle).

  • Right click on this control and choose "Open Type Def."
  • In the new window (Platinum_MB_SerHandle.ctl), right click on the "VISAResourceName" and then choose Replace > <preferred style, I chose modern> > IO > VISA Resource Name

replace.png

  • The VI (possibly visible behind the ctl window, depending on your screen layout) will have this control become faded/grey.
  • Save and close the .ctl file (you may receive an additional save prompt when closing)
  • The VI should update to have the same datatype (VISA Resource instead of String)
  • Retry the application.

I'm uncertain if the string holding your VISA Resource at present is losing some information about the connection - by making this change you can ensure it remains in a proper "VISA Resource" type.


GCentral
0 Kudos
Message 28 of 35
(872 Views)

I beleive this was a strong step in the right direction, but ultimatly this did not solve the probelm.  I am still recieving an error message when I try to run the program, but this error message is much shorter than the other.  The error code is -1073807346 with the error message being

 

VISA Flush I/O Buffer in Platinum_MB_SerClose.vi->Jackson's Temp Controller 3.vi

 

I don't beleive that this I/O buffer is a subVI I could make changes too, and as a result I don't know how to fix this error.


Thank you,

Jackson

0 Kudos
Message 29 of 35
(853 Views)

@jackson040 wrote:

I beleive this was a strong step in the right direction, but ultimatly this did not solve the probelm.  I am still recieving an error message when I try to run the program, but this error message is much shorter than the other.  The error code is -1073807346 with the error message being

 

VISA Flush I/O Buffer in Platinum_MB_SerClose.vi->Jackson's Temp Controller 3.vi

 

I don't beleive that this I/O buffer is a subVI I could make changes too, and as a result I don't know how to fix this error.


Thank you,

Jackson


The error is being thrown by the Flush I/O Buffer node, but you could change the Platinum_MB_SerClose.vi.

I have a follow-up question (before suggesting the change): Does the Read now work correctly?

 

If you'd like to simply avoid the error, you can probably replace the "Platinum_MB_SerClose.vi" with an Unbundle by Name to get the VISA Resource, then VISA Close.vi.

An alternative is to open the SerClose.vi, and delete the Flush I/O Buffer calls. You might try removing one then the other to check which is throwing the error.


GCentral
0 Kudos
Message 30 of 35
(832 Views)