Hello,
My task is to write a program for controling a monolayer trough for a physical-chemistry experiment.
The system has a step motor who move a barrier across the trough. The motor has a NormalClose switch at one end which is intended as a home switch. At one end of the trough is a pressure sensor mounted who read the surface pressure. The experiment consist in forming an layer on the surface of the trough and compressed by moving the barrier, simultaneous with pressure reading.
The motor has his own driver that accept digital puses for control. One line is for clock, one clock pulse advance the motor with one step, and the other line control the step direction. The signals are TTL type.
Generating the clock is done. Is one VI.
Reading the home switch and toggling the direction pin is done. Another VI.
Reading the pressure sensor it is done. Another VI.
Now the problem(s):
At one button click i should have the following sequence:
a) toggle the direction pin to HI level;
b) generating pulses
until the home switch is pressed;
c) toggle the direction pin to LOW level;
d) generating a given number of pulses;
e) for each pulse to read the preasure sensor and plot the value.
f) save the preasure values.
The available hardware is PCI-6251.
Best regards,
Gabriel