04-13-2022 01:58 PM
Hello,
I have some matlab code that sends a random number (-1 or 1) to labview. I currently have a labview VI that reads this number and shows it on the front panel. Let me call this 'subsys1' and 'output1'.
I have another labview VI, let's call it 'V1'. In 'V1' I have my subsystem 'subsys1' with 'output1' that connects to a numeric indicator on the front panel. When I run 'subsys1' on it's own, I read -1/1(constantly updating) in the numeric indicator on the front panel. When I run 'V1', I read '0' for 'output1'. However, when I look at 'subsys1' in the background(while 'V1' is running), I see -1 and 1 on the numeric indicator.
I would appreciate any suggestions for what the problem could be. Thank you.
04-13-2022 02:51 PM
It is quite hard to comprehend your text descriptions. Could you please attach the VIs and MATLAB code that you're describing and some GIF/image of the issue?
04-13-2022 07:56 PM - edited 04-13-2022 08:00 PM
To recreate my problem, run 'main_minimal_V0.m' in matlab. This code sends 2 numbers from matlab to labview(if I can change it to 1 that would be great, but I'm not sure how) and also receives 3 numbers from labview. 'exchangeData.m' should be saved in the same folder. In labview, run 'mainVi.vi'.
If you have 'exchangeData.vi' open at the same time, you'll see that either -1 or 1 appears in the 'string from matlab' indicator on the front panel(in exchangeData.vi). However, in the 'mainVi.vi' front panel, the numeric indicator is 0.
I want the indicator on the mainVi.vi front panel to be 0.
I am having issues attaching 'exchangeData.m', I have tried renaming it and uploading it as a txt instead but to no success. I will try to edit this post.