10-05-2019 03:18 PM
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?
10-05-2019 03:47 PM - edited 10-05-2019 04:15 PM
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.
10-05-2019 10:39 PM
This is the problem RavensFan was suggesting might be occurring (this example is heavily simplified, but hopefully describes the situation):
@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.
10-07-2019 06:28 AM
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.
10-08-2019 11:28 AM
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.
10-08-2019 11:35 AM - edited 10-08-2019 11:52 AM
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)
10-10-2019 11:46 AM - edited 10-10-2019 12:31 PM
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.
10-10-2019 08:24 PM - edited 10-10-2019 08:25 PM
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).
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.
10-11-2019 02:34 PM
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
10-11-2019 11:31 PM
@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.