Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add taskManager and check for libLoad errors #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JohannesFriedrich
Copy link

checked on emulator for CS8C and CS9

PR to #35

checked on emulator for CS8C and CS9
@gavanderhoorn
Copy link
Member

So this is currently stalled as I don't have access to SRS or a Staubli robot.

I'm willing to accept the PR based on the fact that you've tested it @JohannesFriedrich, but that would mean it'd be harder to understand future support requests -- if you're not around that is.

It would be great if we could have one more additional user confirming this is all fine. Perhaps @marshallpowell97 could take a quick look?

@gavanderhoorn
Copy link
Member

@JohannesFriedrich: I'm also wondering about the diffs. Did you change the line-ending used in the listed files?

</Types>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://www.staubli.com/robotics/VAL3/Project/3">
<Parameters version="s8.12Cs9_BS2378" stackSize="5000" millimeterUnit="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this cause problems on CS8 controllers?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it yet, but the change in version doesn't prevent me from opening it on CS8. I will be working on this for the next few weeks and will review this PR.

call libInterface:clearScreen()
endIf

taskKill("streamerTask")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense to kill the tasks with their string name, it is being set as a variable at the start() program,
sStreamTaskName = "streamerTask"
And the tasks are being created with the variable,
taskCreateSync sStreamTaskName, nFbkPeriod, bFbkOverrun, dataStreamer()
Then would make sense to kill with the variable as well:
taskKill(sStreamTaskName )
and not like it is at the moment,
taskKill("streamerTask")

toNum(l_sVersionMinor, l_nVersionMinor, l_bOkMinor)
if(!l_bOkMajor or !l_bOkMinor)
popUpMsg("Error reading VAL 3 version")
call stop()
Copy link

@carpintas carpintas Feb 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't do this, calling the stop() here! And after this, the application stops running, which means the stop() program is called again. I would just end the start program either by doing nothing or with a return otherwise the stop() program is running twice!

else
// feedback task will run every 20ms (50Hz)
nFbkPeriod=0.02
//l_nFbkPeriod = 0.032 // 30Hz
Copy link

@carpintas carpintas Feb 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also change the name on the comment as well, from l_nFbkPeriod to nFbkPeriod. Same for the others...

Copy link

@carpintas carpintas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gavanderhoorn What do you think? These are minor changes that will defiantly improve the original master branch, there are a few typos that I or you could fix. Also, the task manager is only creating the tasks if any are killed. It would be great to display this information o the pendant as well. I can do it if you wish...

carpintas pushed a commit to carpintas/staubli_val3_driver that referenced this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants