LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial comm, binary or text?

Solved!
Go to solution

Producer Consumer uses queues to pass the commands from one loop to another.

 

0 Kudos
Message 11 of 13
(503 Views)

@Haddock01 wrote:

I looked at the examples. Nothing that surprise me. Thanx.

I forgot that the computer are Master and the periperials are slaves. The slaves never initate a comm with the application! It makes my life easier. That means that I need two loops. The first main-loop contains a statemachine that takes care of the overall process. The other loop contains a event which initiates a communication with a specific unit. This "comm-loop" gets commands from the main-loop. 

Is this model a way to deal with this? (perhaps I should start a new thread about this ..)


If you want to "constantly" talk with your device irregardless of the state machine logic, then this is a great route to go.  If not, then you won't be gaining much going to a second loop as it will become a synchronous communication scheme anyways (therefore might as well have the SPI communications in the state machine).


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 12 of 13
(482 Views)

I will certainly take this into consideration.  Thanx!  

 

Why I thought about a specific loop for COMM was because I have two targets. I imagined a queue of commands and addresses that fed the comm-loop. (we are now speaking about I2C instead of SPI).

 

 

 

0 Kudos
Message 13 of 13
(475 Views)