From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, 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: 

multiple slave modbus w/r sequential operation

Solved!
Go to solution

You are not resetting the Elapsed Time Express VI.  If  you turn on AutoReset, it will reset itself after the 5 minutes pass and begin counting on a fresh 5 minutes.

 

Your 1 iteration While Loop does nothing.  Eliminate it.

 

You have "Writing" spelled wrong by putting in an extra "t".

0 Kudos
Message 11 of 19
(1,685 Views)

Thanks for your answer, and sorry for mispelling "Writting", it would be a good idea to add and on a spell correctorSmiley Wink

 

Regarding the Elapsed time VI, I think I did not explain myself clearly in there. What I need is to undertake one singe count everytime the state is executed, and stop until it is back to that state.

 

and regarding the while, I do not really understand, I have got only one loop.. could you please show me the mod in the vi attached.

 

THanks again

0 Kudos
Message 12 of 19
(1,681 Views)

Just to add more information about my issue with the state machine. Please see screenshot below

State_mismatch.jpg

0 Kudos
Message 13 of 19
(1,669 Views)

I misspoke.  I should have said your 1 iteration "FOR" Loop does nothing.  The one that you have the Elaspsed time VI inside of.

 

I modified your VI to clean up some issues.  As far as I can tell, your VI seems to be doing exactly what you are telling it to do.

 

Start  >>  Write  >>  Stay in the 5 minutes state until timer is up >>  Read  (Then Loop back to Write.)  Only if Stop button is pressed do you want to stop the loop.

0 Kudos
Message 14 of 19
(1,656 Views)

Hi Ravens,

 

Thanks for the support, but I think you attached the wrong file. It is first version I posted, no state-machine based.

 

It is weird, in my laptop is not transitioning back to writing as you can see in the screenshot. the value of the new state is not transmitted for some reason..

 

Regards

0 Kudos
Message 15 of 19
(1,652 Views)

Oops.  You're right.  I must have still had that older version sitting on my harddrive and attached that one by mistake.

 

Try this.

 

Did your VI run long enough to update the probes?  Your probes don't show a timestamp to be able to see when the last value was acquired.

Message 16 of 19
(1,636 Views)

Hi RavensFan,

 

Thanks for your support again.

 

Your mod worked as discussed thanks a lot.

 

In that screenshoot I sent, it was taken after 5 mins running and nothing changed, but anyway I guess some mistakes in the wiring of the state machine and the MODBUS modules were causing trouble.

 

Now I made some changes to try to address a different number of slaves, however I am not able to get it to work properly.

 

Some times the state machine gets stuck, due to an 6101 error in the modbus library module

Any suggestions about potential changes that could solve

 

Thanks a lot

0 Kudos
Message 17 of 19
(1,614 Views)
Solution
Accepted by topic author Rcano_1982

eventually I figured out what was going on. All seems to be okay now.

 

Many thanks RavensFan for your support, thanks to you and the app engineer from NI to put me in the right direction.

 

Regards

0 Kudos
Message 18 of 19
(1,602 Views)

@Rcano_1982 wrote:

 

Many thanks RavensFan for your support...


 

you can thank him by giving KUDOS Smiley Wink for the many explanations and vi's given to help you come to your solution....

0 Kudos
Message 19 of 19
(1,591 Views)