LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bidirectional connection between array and controls

Solved!
Go to solution

Hi Laian,

 


@Laian wrote:

There is a problem they delete my post

its not me

I dont know why! maybe because I have attached it as a zip file!!


No, it's (most probably) not your fault. (I already reported the problem in the ForumFeedback thread.)

You didn't attach a ZIP file, but a RAR file. Don't do so in the future: always create regular ZIP files as are supported by Windows natively!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 31 of 40
(1,157 Views)

Maybe in the interest of clarifying the situation, you could describe the current problem, upload the latest VI/code (as a zip, if appropriate) and indicate which things you've most recently tried?


GCentral
Message 32 of 40
(1,153 Views)

Also, to reassure you regarding your uploading skills, I think I've also had a file I uploaded dropped recently.

 

Just once you finish the dialogs to upload, wait a few seconds for it to appear at the bottom of your post before you click post - that might have helped me when I edited my post. 

 

Not sure if it will help you or not but worth a shot.

 

Also the forums have a habit (already reported) of not showing attachments immediately after you post them, so refreshing the page if it looks like it went missing is worth checking before editing and reattaching.


GCentral
Message 33 of 40
(1,184 Views)
Hi I used termination char but it didn't solve my problem. Actually I just wanted a very very simple reading and writing about 700 bytes the same as a hyper terminal software does. if I decided to use Labview just it was because I can move the control displays and see separate values in a better way. I dont want to add terminate char. just like hyper terminal software. it is very simple why cant do it?
0 Kudos
Message 34 of 40
(1,171 Views)

Hi Laian,

 


@Laian wrote:
Hi I used termination char but it didn't solve my problem. Actually I just wanted a very very simple reading and writing about 700 bytes the same as a hyper terminal software does.

You should NOT use the TermChar, i.e. SWITCH IT OFF!

(Again you failed in attaching your VI or atleast a snippet of relevant code!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 35 of 40
(1,167 Views)

Hi Laian,

 

If you don't want the term char (and you're sure this isn't being added by default to Hyper Terminal) then you can simply toggle it off as GerdW mentioned.

 

If you're using VISA Configure Serial Port then the necessary option is manipulated using a boolean input to the top of the node, called "Enable Termination Char", which by default is true. Just wire a false constant, and no more term chars.

cbutcher_0-1583832939496.png

 


GCentral
Message 36 of 40
(1,163 Views)

my VI attachment

hope not to be deleted

Download All
0 Kudos
Message 37 of 40
(1,158 Views)

Hi Laian,

 

SWITCH OFF THE TERMCHAR!

 

(And use less local variables: "sum of bytes" can all be wired!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 38 of 40
(1,155 Views)

ohhh yes by switching off the termchar now it works correctly

Thanks Mr GredW sorry if bothering you 

Thanks a lot

0 Kudos
Message 39 of 40
(1,147 Views)

Would something like the following be helpful?

testTest2.png

 

Here all the values are 0, so it's not that illustrative (this is also why I use "OldVal" in the Event Structure) but it demonstrates you could have quite a bit less code necessary to initialize your setup.

 

You can also then use an Event Structure (with NewVal, not OldVal, or just directly read the control) to get the updated values without needing the polling system - you only have to update when something is changed.

 

Note with this arrangement (using arrays) you need to specifically wire a false to the "prepend array or string size?" input of flatten, or else you'll get extra bytes (which will presumably mess up your device/communication).

 

Edit: Of course you can use a Boolean Control to trigger the write, and not update every change if you want to make a set of changes then confirm all at once...


GCentral
Message 40 of 40
(1,145 Views)