10-16-2024 10:39 AM
I cannot figure out how to convert from Labview mathscript to MatLab script.
I need a reference to do some very simple stuff.
Does anyone know of tutorials that would help with a conversion?
John
10-16-2024 12:52 PM
I cannot look at your VI (only access to LabVIEW 2020 at the moment), but I would start by just copying the text between the two nodes and create connectors as needed.
10-16-2024 11:04 PM
Is there a reason why you chose the Math script way instead of native LabVIEW functions?
10-17-2024 12:12 AM
Please see if this LabVIEW equivalent makes sense (I don't know what you intended with the logic, but this should match your Math script logic)
10-17-2024 08:37 AM
Thank you for the help in this matter.
I am working with some older course material.
I think the professor, at the time, wanted the students to exercise different aspects of LabView.
I started the students using the latest version of LabVIEW (2024) and found that not all previous course material would work.
I am working with other instructors to deliver the Lab material.
I am looking for methods to upgrade the course material and not rock the boat too much.
The intent of the script is to control a servo motor to move forward then reverse to imitate a waving motion. The user would set the values for the speed and the number of waves before initiating the go logic.
John
10-17-2024 10:55 AM
If this is a LabVIEW course, polluting it with Matlab is a distraction that will dramatically complicate things and distracts from the pure beauty of a dataflow language. Santo already showed how it could be implemented in pure g.
10-17-2024 11:20 AM
The course is an IOT type of course from several years ago.
The original owner of the course is no longer with the program.
I understand that any course material could be better.
The course deals more with Arduino, sensors and simple control.
The LabVIEW is the tool which is hosting concepts of data I/O for the programmer.
I was not critical about the delivery because I am a temp or sessional instructor for the delivery..
I will suggest the ideas to my supervisor at the time of course review.
The other instructors will have the students work with LabVIEW 2022 so they can deliver the course.as it was originally designed.
Thank you for all your help.
John
10-24-2024 08:43 AM
I tried the program and it did not work.
This is a sub vi that will take the input of Speed and NumberOfWaves and provide an output of a changing Angle1 between an upper and lower value between 0 and 180 degrees.
The Speed variable determines the rate at which the Angle changes. The limits are checked to ensure the output does not go outside the useable range.
The Waving, WaveCount and Direction are indicators of what is happening during the process.
The sub VI would also have a delay of 10 mSec. The Angle1 gets translated to pulse width for a servo motor.
If the VI was to work you could run it and watch the count and Angle1 change until the WaveCount has been completed.
10-25-2024 04:58 PM - edited 10-25-2024 04:59 PM
@mohawkcollege-john wrote:
I tried the program and it did not work.
There are billions of ways the term "does not work" can be interpreted.
Since we cannot see what you did, three is no way to tell.