LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering commands

Hi,

I currently have a load cell that I have interfaced with a RS232 port. The load cell is sending string data which I am collecting using the I/O Instrument Assist manager in LabView. I am collecting that data, converting to dynamic type and writing to a LabView meaurement file. I have this setup in a while loop to keep collecting data. I am also writing string data via another RS232 port to a stepper motor driver. I am currently just doing testing of the driver/motor using the LabView example code Basic_read_and_write.vi. What I basically wish to do is that when the load cell reading reaches a target value, I send a diferrent string to the stepper motor driver. The initial write string to the drive cell is "M+", which makes the motor move forward at constant velocity. The motor will apply a force on the load cell. When this force reaches a target value, I want the write string to the driver to change to "M-", which moves the stepper motor backwards at constant velocity.

I was thinking of using the case structure function and having the "true" case as the move forwatd string and the "false" case as the move backward string. I was then going to use the function in the string palette that outputs a boolean "true" or "false" depending on the value of the input string, where the "true" or "false" output is wired to the case structure.

Does anyone have some better suggestions than what I have thought of? This seams a bit convuluted. Can someone see a modification of the 2 port read/write example. Any help would be really appreciated.

Cheers,
Dave
0 Kudos
Message 1 of 3
(2,184 Views)
Hi Dave,
 
If your application writes either M+ or M- consider using the "select" function from comparison palette and wire the conditional terminal of the "select" function from the set point comparator "from load cell value comparison".
I think this is the other way to do it, though I'm not sure if it works with your application
 
Regards
Tareq
 
0 Kudos
Message 2 of 3
(2,152 Views)

Hi Dave,

Is your system controlled solely through serial communication? 

The method Tareq mentioned is probably what you are looking for, although I must mention that the method you were previously considering has its merits.  By using a case structure, your program will be more easily upgraded should you ever decide to add other options. 

It sounds like your on the right track!  Good luck,

Robert

Message Edited by RManion on 07-06-2005 07:06 PM

0 Kudos
Message 3 of 3
(2,120 Views)