Posts
268Joined
Last visited
About Kristoff
Profile Information
- Gender
Male
- Location
Seattle, WA
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Kristoff's Achievements
-
Kristoffchanged their profile photo
-
If one case of an event structure is executing while another event (or many events) occur those events will queue up and be handled int he order they occurred, so the behavior your describing sounds more like a symptom of the problem (ie the wait till complete VI not waiting) rather than something caused by the event structure. I would return to this experiment and try to determine the first VI to behave not as expected. Can you post the code for this one? Are you doing closing the stepper and the Arduino at the end? If the Arduino is not reset it's possible memory is leaked in the firmware when allocating / deallocating steppers.
-
There is a potential for issues when using 'Stepper Wait Till Steps Complete' with multiple steppers. It looks like the firmware sums the distance remaining for all steppers and then the LabVIEW side checks if it's not equal to 0. If one stepper has positive x steps to go and another stepper has negative x steps to go the VI would report that there are no steps remaining and the VI would unblock. If you're only using a single stepper that shouldn't be a problem, but it is something to be aware of. case 0x33: // Stepper steps to go retVal = 0; for(int i=0; i<8; i++){ retVal += steppers[i].distanceToGo(); } Serial.write( (retVal & 0xFF) ); Serial.write( (retVal >> 8) ); -Kristoff
-
Firmware source code is here. The code you posted looks like the your first test case. Can you post the second test case? Also, when you say 'Running Continuously' do you mean using the 'Run Continuously button' (as show in the image below) or are you running continuously by placing your code in a while loop? Thanks! -Kristoff
-
James pointed out that the screenshot I posted is basically what you're doing your first post. I was looking at the interactive movement section of you code (the case that came up when I opened it. I would try a simple example, that is just the 4 VIs I posted above with the LIFA open / close on either side and see if it does what you expect. Remember to add error handling as well to see if there is an error somewhere. Can you give that a shot, post your code and let us know what the results are. Thanks! -Kristoff
-
Hey, No need for other structures, just insert the 'Stepper Wait Till Steps Complete' VI between the 'Stepper Write' VIs and let dataflow do it's thing.
-
Hey, The LIFA Stepper Write VI is non blocking. It tells the Arduino to go a certain number of steps, and the firmware on the Arduino generates the actual stepper output signals in the background. This allows you to read/write other data while the stepper motor is running. In your first screenshot you are telling the stepper to go forward X steps, then immediately telling it to go backward X steps without giving it time to complete the forward steps. If you want to wait for the forward steps to complete you'll have to explicitly do so in your code using the 'Stepper Wait Till Steps Complete' after your Stepper Write command. The 'Stepper Wait Till Steps Complete' will block execution until the pending steps have been completed. Let us know if you have any more questions about this. Thanks! -Kristoff
-
I wrote LIFA tsakitsan, it sounds like this is just a bug in your LabVIEW code. Can you post a screen shot of the full block diagram and also attach the VI? Thanks! -Kristoff
-
Hey Watson, Mac users typically do not need to manually install the drivers, but we've seen a couple instances where updating the drivers helps. Can you run the Digilent Agent with admin privillages. It's possible the user that the Agent is running as does not have permissions to access the port. Thanks! -Kristoff
-
Ahh interesting. I didn't look close enough and missed the 'command' in the first packet. You are correct that JSON does not guarantee the order of the tokens. That being said every JSON library I've used leaves them in the same order, but Python 2.7 may be special The OpenScope parser should handle this, but it looks like it may not. I'll have to ask Keith about this when he is back in the office next week. -Kristoff


