
bjarni
-
Content Count
27 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Calendar
Blogs
Downloads
Articles
Media Demo
Posts posted by bjarni
-
-
Hello, I would like to push and retrieve data to and from the the internet directly from my Unistream.
I tried to connect to a server on Amazon, a working database (MSSQL) we are using in another project. But when doing a simple query I get error:
"20009 Unable to connect to data source Unable to connect: Adaptive server is unavailable or does not exists"
Anyone here who could give me a hint on what I need to do?
The Database is set up as "SQL Server" with IP-number and instance name, database name, user name and password.
Another question is if I can use other kind of web services to handle my data ?
Thanks,
Bjarni Gudmundsson
-
2 hours ago, bobnorway said:
a good rule is to make your pulse to a flag bit, Px -> M123
then the flag M123 will be the same for all of your program code.
using a frequency function several places in the code could be a problem because it is asynchronous
and can change during your program execution.
👍 Exactly!
-
18 hours ago, ORSO2001 said:
you are calling the same function twice...I think that, in this case, the Frequecncy.Frequency1ms is consider as a static variable in this function...then its status will be propagted in the other calls after the first call...
if you try the same but with two different function (UDFB) its will works...
Yes, I know now
- but it would be awkward to write the same function twice - just to catch this event. Instead I made an global event or bit which is ON for one scan through the whole by putting this in the beginning in my Main:
-
Hello, I'm considering what is the scope of the Positive Transition Event in the program. I thought it was supposed to stay on for one pass to the whole - but maybe that's not correct?
In this example I'm catching the 100ms frequency and I'm checking it in a function which I call twice with different parameters - but the event only stays on in the first call to the function:
and in this case the TestFunc is only:
(N is the "Out" parameter)
Is this as it is supposed to be?
Thanks, Bjarni
-
Ok fine - thanks for the advice
-
12 minutes ago, Saragani said:
Can you share a project, so I can reproduce the problem easily, and fix the bug?
Hi, can I send it to you? Don't feel comfortable leaving the whole stuff here in the open...
-
Hello,
I ran into problem where I had a screen with two instances of the same Custom control (see picture).Parameter to the control on left is TestFlag1 and on the right it's TestFlag2. Accordingly THe light on left shows TestFlag1 ad the other is TestFlag2.
When a button is pressed, a message box pops up and when OK is pressed there the value of the parameter (TestFlag 1-2) is toggled. Problem is that it doesn't matter which button I press, there is only the value of TestFlag2 which gets toggled (i.e. light on right toggles no matter which button I press)
If I skip the message box and do the toggle directly in the button press, the correct flags are always toggled. Am I missing the correct way to do this or is it just something I have to work around ?
Thanks, Bjarni -
Hello, I've been trying to load a string from a c-function - without luck. Made few approaches though.
One example here:
--------------------------------------------------
char arr[3][32] =
{ "String 1",
"String 2",
"String 3"
};
// User code ends above this comment
static void getString(unsigned short Index, volatile char* TheString, int TheStringLen)
{
// User code starts below this comment
TheString =arr[Index];
// User code ends above this comment
}-----------------------------------------------------
TheString defined as here:
Is there a way to do it?
Thanks, Bjarni
-
THanks - it has been solved now. THe main issue was nonmatching Slave ID. Totally my error.
-
Looks like the issue lies on the other site as I get similar error when trying to read it from my PC...
-
Hello,
I'm trying to poll some values from Laumas weight transmitter - and I'm kind of stuck. I've tried to read some addresses according to the Laumas manual, but the power-up value in the receiving variable is never overwritten. I get modbus status as -11, which I don't know what means.
THe setup:
It should be reading all the time if set up as periodic and the active bit is set ?
The values when running:
Anybody with any hints for me?
Thanks, Bjarni -
👍
I'll keep it in mind, Thanks
-
Thanks DanT, I'll have one unit shipped to me...
-
Hi Aus, Encoder is TURCK RI-12H14T-2B4096-H1181
Thanks, Bjarni
-
27 minutes ago, Ausman said:
I thought the D16A3 could already do what you want. Quote from Install Guide:
<<<< Inputs 4 and 6 can function as high-speed counters, frequency measurers, or general purpose digital inputs (set in software). Inputs 5 and 7 can function either as counter reset inputs or general purpose digital inputs (set in software). >>>>
If you are wanting to keep up with this read in "real time", you might run into issues due to the delays using the EX-RC1 via a bus.
cheers, Aus
Yes, but encoder isn't just a counter. I need to stop/start motor at different positions at predetermined but variable degrees and I believe that I read somewhere (maybe these forums) that fast counter isn't enough.
-
Hello, I have an Unistream panel and EX-RC1+ D16A3-RO16 + LC3 units hooked to it via CAN bus. I have to read position from an encoder (with A, B and Zero inputs) and wonder if someone here would give me an suggestion regarding hardware for the job? Should I just add an IO unit (and which one) or could I replace the D16A3 unit with another which also supports encoder readings?
Thanks, Bjarni
-
-
Thanks sgull, but they are the same on both ends - RGYBB. Not so clear on photo though
-
No - all counters on zero!
-
Hello again - as said earlier I'm starting up a project with Unistream hooked to an Ex-Rc1 and D16-A3
Thanks to you guys, I've managed to go through the config procedure as described in the training procedure:
- Configure Ex-Rc1 and the IO unit in Visilogic and export the config to Unilogic
- Read it by Unilogic and export the in/out files to Visilogic and download it to the Ex-Rc1
- Verify that can ID on Unistream is 1 and 2 on the Ex-rc1 (dip on 2 also) . Baudrate 1Mb on both
- Test the D16-A3 IO from Visilogic - could both see input signals and set output from Visilogic
- In Unilogic I can see the image of the IO modules and their IO, but if I try to watch an input or set an output - nothing happens on the IO hardware???
Do I need to do something more than the configs, like some CAN send/receive in ladder? Can I see somewhere if the CAN is operating as supposed?
Thanks, Bjarni
-
Great - thanks. it works now
-
Hi Alon Avivi, don't know which folders you are referring to. You got some full paths? and should I load the file from there?
-
Thanks, I'll just wait.
-
Hello, wonder if you have some hint for me.
I have a an Unistream with remote IO: Ex-RC1, LC3 and D16A3-R016, all hooked together via CAN bus
I followed the config instructions from your training video, starting with an VisiLogic file from your examples. But when I try to load the exported .ulri file in the Ex-RC1 properties window it is like nothing happens, no warning or error messages and the Visilogic File field remains empty ?
Thanks, Bjarni
SQL connection error - or can I use web services
in UniLogic Software
Posted
THanks for the input Patko. It's a MSSQL database I'm using and I´ve tried both with one located on an Amazon server as one on my local net.