Hello Guest it is March 29, 2024, 08:11:05 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Human

Pages: 1
1
Mach4 General Discussion / Re: LUA call functions in dynamic libraries
« on: August 05, 2020, 03:04:59 PM »
Hi Steve

If I understand that correctly, Alien can be run with Lua 5.3.
https://github.com/mascarenhas/alien

I tried to update my Lua 5.1 installation to 5.3 (lua.exe, luac.exe, wlua.exe, lua53.dll).
But when I run "require" wx "" or "require" alien "" I get the following error:

lua: error loading module 'alien.core' from file 'F: \ Program Files \ Systemtools \ Lua 5.1 \ clibs \ alien \ core.dll':
% 1 is not a valid Win32 application
I don't know why.

I don't know what to do with ZeroBraneStudio and Alien either.
Maybe paths are wrong or missing files that Alien needs, I don't know.
I only started learning Lua a few months ago.

Maybe I will find another solution to get to my external dll functions.

thanks
Robert

2
Mach4 General Discussion / LUA call functions in dynamic libraries
« on: July 29, 2020, 05:41:45 AM »
Hello

is it possible to integrate the Lua ALIEN package/addon in mach4?
I need Alien to call functions in dynamic libraries.

I have copied the Alien Folder and alien.lua to Mach4 Modules.
But if i started my code in debugging mode and "require "alien"" is calling, at this point "local core = require "alien.core"" the Debugging session will be closed without errors.

Maybe because of the missing Luarocks extension?

With my sepetrate LUA 5.1 installation the Alien calls works fine and without errors.

Can anyone help me?

Thanks
Robert

translated by google and myself

3
VB and the development of wizards / Re: VB - vbNullChar pass to function
« on: November 20, 2018, 06:05:25 PM »
Hi

I want outsourcing my non-sensibility IOs to a SPS and call them with Modbus.
But Modbus with API call, not Mach3 Modbus.


4
VB and the development of wizards / Re: VB - vbNullChar pass to function
« on: November 20, 2018, 10:10:49 AM »
Hi

I didn't used the CStr function. Sorry, a mistake of myself.

I saved always to a file and looking the results with an Hex-Editor.
So i can see what cypress is passing.

Perhaps the len function is not the right, around to see, if cypress can handle this or not.
Rather a byte length function for character.

I tried with following API and i think  the matter is clear:
Code: [Select]
Declare Function VarPtr Lib "msvbvm60.dll" (ByVal lpObject As String) As Long
Declare Function SysStringByteLen Lib "oleaut32.dll" (ByVal pBStr As Long) As Long

strTest1 = Chr(1)
strTest2 = Chr(0)

MsgBox SysStringByteLen(VarPtr(strTest1)) 'result: 2

MsgBox SysStringByteLen(VarPtr(strTest2)) 'result: 0

But this will not get me anywhere.
Possibly it works with an self-written dll to bypass cypress, but I would have to first learn VB.Net or C++.

Thanks

Robert

5
VB and the development of wizards / Re: VB - vbNullChar pass to function
« on: November 19, 2018, 09:06:02 AM »
Hi

at me the length of &H00 is 2 and in Hex-Editor view the result is it character 30.
I need character 00.

Again a dead end, but I`m not giving up  ;)

Thanks

Robert

6
VB and the development of wizards / VB - vbNullChar pass to function
« on: November 18, 2018, 03:29:01 PM »
Hi

why can't cypress to handle chr(0) as string?
I need string hexadecimal NULL to pass it to a function, but my impression is, cypress can't this.

Code: [Select]
'Cypress example:
strTest = chr(0)
len(strTest) 'result: 0
isempty(strTest) 'result: false
isnull(strTest)         'result: false
strTest = ""  'result: true

'VBA example:
strTest = chr(0)
len(strTest) 'result: 1
isempty(strTest) 'result: false
isnull(strTest)         'result: false
strTest = ""  'result: false
strTest = vbNullChar  'result: true

In MS Excel VBA the function works fine, with cypress doesn't it.
Can anyone help me?

Thanks,

Robert

7
VB and the development of wizards / Re: Total Operating Time in Macro
« on: January 30, 2017, 03:58:57 AM »
getparam("TotalHours")

8
Hi
how can i write a brain for two outputs, which only turned on, if the other output is low, but no output may turn off the other?
I have tested many variations, but none brain has swiched, how i would to like, or i have a problem with the logic thinking.
thanks for help.

greetings
Robert

ps.
Please if possible, dont answer so complex, because the Google translator translated very strange.

Pages: 1