From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a sequence to send

Hello, 

I'm working on a labview design to make a interface to talk with FRDM-KL25Z (mbed board) in order to configurate a component. 

I have:

  • a ring menu containing number from 0 to 27 that represent registers of the component I want to configure
  • a case to put number in from 0 to 255 (uint 😎 that represent the value I want to write to the component
  • a switch button (0 = read 1 = write) 
  • Visa and MBED write module to communicate to the board.

What I would like to do is to create one stream bit containing in that order: 

the 8 bits of data + the number of the register + R/W bit + binary value 011

 

This bit stream should be sent after i clicked on a "launch" button. 

I joined what I started doing but it's very poor of content. It's my first attempt in Labview. 

 

thank you for your help 

 

0 Kudos
Message 1 of 5
(3,034 Views)

First of all, I recommend using an Event Structure.  It will make things a little easier to handle button presses.

 

Otherwise, what exactly are you having issues with?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,990 Views)

Hi crossrulz, 

 

I now have a "case structure" and if the launch button is pressed, then the process into the case will be executed. My issue is to create sequencialy the data to send to my mbed target from ring menu, from Read/Write switch and Value case. Should I copy paste three times the "mbed write" object and one will be connected to ring menu, other to value case and the last one to Read/Write switch?

Or is there a more elegant solution, doing this with only one "mbed write" object and create step by step one only string containing the sequence of data? 

 

Thank you for your help,

0 Kudos
Message 3 of 5
(2,944 Views)

If you are repeating steps, that sure sounds like a FOR loop would be useful.  For a series of Writes, I would make an array of messages to send and then use a FOR loop to index on those messages and write inside of the loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,939 Views)

Thank you crossrulz, later in my project I'll have an array to send yes. I will use a for loop. But on this topic it was only one specific message I wanted to send so no need of a for loop. My goal is to program an interface similar to this one: Interface analog devices but compatible to my target. 

BTW I found a solution on my own (see attached file). If I don't understand how to access my array using for loop I'll come back in another topic 🙂 

 

Thank you for your advices

0 Kudos
Message 5 of 5
(2,921 Views)